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 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; } } } }