Skip to main content
Legend
January 2, 2014
Question

How to store layer's transform group parameter values in read-only effect parameters

  • January 2, 2014
  • 1 reply
  • 996 views

Happy New Year everybody!

As the new year begins, I have new questions

Is there any way to assign the values of parameters found in a layer's Transform group into a plugin's parameters.  I need to ensure that those transferred values are read-only and not alterable by the user?  I was thinking of using a button that a user can click to "capture" the state of the tranform params and place them into the plugin's read-only params.  What might the best way to go about doing that?  How can I make a parameter read only from the user's perspective?


Thanks,
Arie

This topic has been closed for replies.

1 reply

Community Expert
January 2, 2014

happy new year arie! (here's hoping)

is i understand what you want to do correctly, it's a very simple manner.

part 1:

accessing the layer's transform value can be done at any time (except for

that weird moment where the plug-in is first applied, where sequence_setup

is called by the effect has not associated layer yet), via the AEGP_Stream

suite.

part 2:

now you wish to store "read only" params. that can be done in quite a few

ways, depending on what you want the user to experience.

1. store them in sequence data. the user won't even know it exists.

2. store them in regular params and set their state to "hidden". a somewhat

simpler implementation of the above method.

3. store them in regular params, and set their state to "ghosted"

(AEGP_SetLayerFlag()). the user will see but won't be able to touch.

4. store in regular params, but make them supervised. when the user changes

their value, change it back to the original. the user will be able to see,

even copy, but not change.

5. create a custom UI and display the values. you could also use that

custom UI to grab the values when clicked.

Legend
January 2, 2014

Hi Shachar,

Yes, here is hoping to a great 2014!

Thank you for laying out all the options I can proceed with.  I wish there was a way to grab them upon the user applying the effect to the layer so they wouldn't need to do any work to capture them right away, but it sounds like it won't be possible.  Is there any way to grab the values in the function that is called directly after sequence_setup so that the transform values are grabbed without having the user perform any explicit interaction?  A work-around?

In any case, I think option 3 is best for my plugin because I want the user to be able to see what the transform values were when they "captured" them into the plugin params.

I'll begin coding it up and see where this goes!

Thanks,

Arie

Community Expert
January 2, 2014

you can capture on the fist update_params_ui call, but you'll need to

figure out how to do it only once. (storing a flag in sequence data is one

way to go)

you can also capture on the first render call with the same "once" issue.

have you determined what behavior you'd like applied when the effect is not

applied, but copied to a new layer?