Exemple #1
0
 /// <summary>
 /// Moves the provided IINode Anim handles to the provided layer.
 /// If the handle is not an IINode, it will be skipped.
 /// </summary>
 /// <param name="handles"></param>
 /// <param name="layer"></param>
 public static void MoveNodesToLayer(IEnumerable <UIntPtr> handles, IILayer layer)
 {
     foreach (UIntPtr handle in handles)
     {
         IINode maxNode = MaxAnimatable.GetAnimByHandle(handle) as IINode;
         if (maxNode != null)
         {
             MoveNodeToLayer(maxNode as IINode, layer);
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// Selects the provided IINode handles in 3ds Max.
        /// If the handle is not an IINode, it will be skipped.
        /// </summary>
        /// <param name="handles"></param>
        public static void SelectNodes(IEnumerable <UIntPtr> handles)
        {
            IINodeTab nodes = GlobalInterface.Instance.NodeTab.Create();

            foreach (UIntPtr handle in handles)
            {
                IINode maxNode = MaxAnimatable.GetAnimByHandle(handle) as IINode;
                if (maxNode != null)
                {
                    nodes.AppendNode(maxNode, true, 0);
                }
            }
            SelectNodes(nodes);
        }
Exemple #3
0
        public static void DeleteLayer(UIntPtr layerHandle)
        {
            IILayer layer = MaxAnimatable.GetAnimByHandle(layerHandle) as IILayer;

            if (layer == null)
            {
                return;
            }

            IILayerProperties layerProperties = MaxLayers.GetLayerProperties(layer);

            if (layerProperties.Current)
            {
                MaxLayers.SetCurrentLayer(0);
            }

            MaxInterfaces.Instance.FPLayerManager.DeleteLayer(layer.Name);
        }
Exemple #4
0
        public static void DeleteNode(UIntPtr nodeHandle)
        {
            IAnimatable node = MaxAnimatable.GetAnimByHandle(nodeHandle);

            DeleteNode(node as IINode);
        }