public static void UnSelect(Node node, Gizmo gizmo) { MaterialTemp matTemp = node.GetComponent <MaterialTemp>(); if (matTemp != null) { Debug.Print("GizmoHelper.UnSelect - calling matTemp.ResetMaterial..."); matTemp.ResetMaterial(); Debug.Print("GizmoHelper.UnSelect - calling node.RemoveComponent with param matTemp..."); node.RemoveComponent(matTemp); if (gizmo != null) { Debug.Print("GizmoHelper.UnSelect - Calling gizmo.SetGizmoVisible(false)..."); gizmo.SetGizmoVisible(false); gizmo.GizmoEnabled = false; Debug.Print("GizmoHelper.UnSelect - Called gizmo.SetGizmoVisible with value 'false' for gizmo '" + gizmo.Name + "'"); gizmo.Node.Enabled = false; Debug.Print("GizmoHelper.UnSelect - Set gizmo.Node.Enabled to value " + gizmo.Node.Enabled.ToString() + " for gizmo '" + gizmo.Name + "'"); } else { Debug.Print("GizmoHelper.UnSelect - Unable to process as gizmo was null!"); } } else { Debug.Print("GizmoHelper.UnSelect - Unable to process as temporary material was null!"); } }
public static void SetAsSelected(Node node, Gizmo gizmo, PulsarScene scene) { StaticModel nodeModel = node.GetComponent <StaticModel>(); if (nodeModel != null && scene != null) { PulsarApplication pulsarApplication = scene.GetApplication(); if (pulsarApplication != null) { MaterialTemp tempMaterial = new MaterialTemp(nodeModel, pulsarApplication); if (tempMaterial != null) { tempMaterial.Name = "materialTemp"; try { tempMaterial.SetTransparentMaterial(); } catch (PulsarGizmoException gizmoException) { gizmoException.Source = "[GizmoHelper:SetAsSelected]"; throw gizmoException; } node.AddComponent(tempMaterial); if (gizmo != null) { gizmo.Node.Position = node.Position; gizmo.SetGizmoVisible(true); gizmo.Node.Enabled = true; } } } } }
public static void UpdateTemporaryMaterialStore(Node node, Material material) { if (node != null) { MaterialTemp materialTemp = node.GetComponent <MaterialTemp>(); if (materialTemp != null) { materialTemp.UpdateMaterialTemp(material); } } }
public static void UnSelect(Node node, Gizmo gizmo) { MaterialTemp matTemp = node.GetComponent <MaterialTemp>(); if (matTemp != null) { matTemp.ResetMaterial(); node.RemoveComponent(matTemp); if (gizmo != null) { gizmo.SetGizmoVisible(false); Debug.Print("GizmoHelper.UnSelect - Called gizmo.SetGizmoVisible with value 'false' for gizmo '" + gizmo.Name + "'"); gizmo.Node.Enabled = false; Debug.Print("GizmoHelper.UnSelect - Set gizmo.Node.Enabled to value " + gizmo.Node.Enabled.ToString() + " for gizmo '" + gizmo.Name + "'"); } } }
public static void SetAsSelected(Node node, Gizmo gizmo, PulsarScene scene) { StaticModel nodeModel = node.GetComponent <StaticModel>(); if (nodeModel != null) { MaterialTemp tempMaterial = new MaterialTemp(nodeModel, scene.GetApplication()); if (tempMaterial != null) { tempMaterial.Name = "materialTemp"; tempMaterial.SetTransparentMaterial(); node.AddComponent(tempMaterial); if (gizmo != null) { gizmo.Node.Position = node.Position; Debug.Print("GizmoHelper.SetAsSelected - Calling gizmo.SetGizmoVisible with value true for gizmo '" + gizmo.Name); gizmo.SetGizmoVisible(true); Debug.Print("GizmoHelper.SetAsSelected - Setting gizmo.Node.Enabled to true for gizmo '" + gizmo.Name); gizmo.Node.Enabled = true; } } } }