Esempio n. 1
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);
        }
Esempio n. 2
0
        /// <summary>
        /// Sets the provided IILayer to the current layer.
        /// </summary>
        /// <param name="layer"></param>
        public static void SetCurrentLayer(IILayer layer)
        {
            IILayerProperties layerProps = MaxLayers.GetLayerProperties(layer);

            layerProps.Current = true;
        }