Exemplo n.º 1
0
        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!");
            }
        }
Exemplo n.º 2
0
        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 + "'");
                }
            }
        }