3 Replies Latest reply: May 13, 2010 3:15 AM by shachar carmi RSS

    Which command is called when plug-in is removed from a layer?

    MindManju Community Member

      Hello,

       

      When we apply an effect to a layer PF_Cmd_SEQUENCE_SETUP is called, like this which command is called when the plug-in is removed?

       

      [

      Here remove means

           1. select the plug-in in Effect Control Window, and then press "Delete" button. Or

           2. select the plug-in in Effect Control Window and select "Remove all" from Effects menu.

      ]

        • 1. Re: Which command is called when plug-in is removed from a layer?
          shachar carmi Community Member

          generally speaking, PF_Cmd_SEQUENCE_SETDOWN is the command you receive when an effect is removed from a layer.

          there a are a few things to consider though:

           

          1. you don't necessarily get that command immediately.

          AE will could (and usually does) wait before sending this call. either until the delete operation is removed from the undo stack,

          or until AE closes (and i'm guessing a few other reasons).

           

          2. you also receive this call when AE closes, or when the project closes.

          so it doesn't HAVE to mean that the effect is removed. it's just telling you to close this dll instance, and free all allocated memory.

          • 2. Re: Which command is called when plug-in is removed from a layer?
            MindManju Community Member

            Why im asking this question is ...

             

            I have created two compositions under PF_Cmd_SEQUENCE_SETUP command, now I have to delete those compositions when the plug-in removed or when project is closed or when AE closed.

             

            PF_Cmd_SEQUENCE_SETDOWN command is getting called when project is closed and AE is closed. but not when plug-in is removed.

             

            So, I want to delete the compositions when plug-in is removed. How can I do?

            • 3. Re: Which command is called when plug-in is removed from a layer?
              shachar carmi Community Member

              but you can tell from PF_Cmd_SEQUENCE_SETDOWN.

              it just happens in a delay. a few user operations afterwards.

               

              if you HAVE to know instantly you'll have to setup some complex mechanism for keeping track of your effetcs.

              you could also intecept all delete commands using AEGP_RegisterCommandHook, and whn you get the call, you check the current collection and see it anything that's of interest to you is being ereased.

               

              is it really worth it?

              shouldnt you just wait a couple of user operations before you get the PF_Cmd_SEQUENCE_SETDOWN call?

              it just about keeping the project tidy. you don't have delete immediatly.