2 Replies Latest reply: Jun 23, 2010 12:09 AM by dheeraj_c RSS

    Custom effect Reset issue.

    dheeraj_c Community Member

      Hi,

          I'm having an issue  with Effect Reset. In the custom effect I have a SLIDER. Whenever Reset is clicked, the Slider reverts back to the default value. I understand  that this is the normal behaviour but I want the Slider to maintain the  old value before Reset.

       

      So is there any way to store the old value just  before Reset so that I can set it back after Reset? Or is there any way  to tell the effect not to Reset the particular parameter?

       

      Thanks,

      Dheeraj.

        • 1. Re: Custom effect Reset issue.
          shachar carmi Community Member

          hhhmmmm....

          you can't tell a param to ignore the reset operation.

          what you can do is to store that data with the sequence data,

          and on SEQUENE_RESETUP you can re-apply that value.

          the SEQUENE_RESETUP call is pretty rare, so you don't mind re-applying the value even when not needed.

           

          if you're using that param for what i think you're using that param (a unique identifier), then you can skip using a param all together,

          and store that data in the sequence data only.

          if another effect wants to read that data it can do it via AEGP_EffectCallGeneric().

           

          one more thing you could try (which could prove tricky) is to set a different default for that slider during the param_setup call.

          that would cause each instance of your effect to reset that param to a different value.

          but that's all in theory.

          i'm not even sure you get more than one param_setup call per session.

          just throwing some ideas out there.

          • 2. Re: Custom effect Reset issue.
            dheeraj_c Community Member

            Thanks a lot again Shachar.

            shachar carmi wrote:

             

            if you're using that param for what i think you're using that param (a unique identifier), then you can skip using a param all together,

             

            You guessed right Shachar. I'm using the param as unique identifier.

            Now I'm saving the data in SEQUENCE_SETUP and retrieving it when needed from AEGP using AEGP_EffectCallGeneric().

             

            shachar carmi wrote:

             

            one more thing you could try (which could prove tricky) is to set a different default for that slider during the param_setup call.

            that would cause each instance of your effect to reset that param to a different value.

            but that's all in theory.

            i'm not even sure you get more than one param_setup call per session.

            just throwing some ideas out there.

             

            I had tried this before but Param setup is called only once when the effect is applied for the very first time.

             

            But thanks a lot Shachar, your first idea works fine.