Example #1
0
        public static void RasterizeLayer(int layer_index)
        {
            // Ref1
            var Ref1 = LayerAPI.GetReferenceToLayerByIndex(layer_index);

            // Desc1
            var Desc1 = PSX.MakeNewDescriptor();

            Desc1.PutReference((int)con.phKeyNull, Ref1);

            // Play the event in photoshop
            PSX.PlayEvent(PSX.StrToID("rasterizeLayer"), Desc1, (int)con.phDialogSilent, PSX.PlayBehavior.checkresult);
        }
Example #2
0
        public static void DeleteLayer(int layer_index)
        {
            // Ref1
            PhotoshopTypeLibrary.IActionReference Ref1 = LayerAPI.GetReferenceToLayerByIndex(layer_index);

            // Desc1
            PhotoshopTypeLibrary.IActionDescriptor Desc1 = PSX.MakeNewDescriptor();

            Desc1.PutReference((int)con.phKeyNull, Ref1);

            // Play the event in photoshop
            PSX.PlayEvent((int)con.phEventDelete, Desc1, (int)con.phDialogSilent, PSX.PlayBehavior.checkresult);
        }