Skip to main content
Inspiring
May 4, 2021
Answered

Change effect defaults based on the type of layer?

  • May 4, 2021
  • 2 replies
  • 574 views

Hi,

 

I'm developing an effect plugin, and I would like to have diffent default settings based on the type of layer that the effect is added to. For example, I would like to use one set of defaults when the user adds the effect to a solid, and another set of defaults when they add the effect to an adjustment layer. Do you know if there is a way to do this using the SDK?

 

Thanks.

This topic has been closed for replies.
Correct answer James Whiffin

There's way too many Shachars on this forum, you can never know which one to trust.

2 replies

James Whiffin
Legend
May 6, 2021

One method mentioned on the old forum (probably from Shachar) is you can add multiple parameters and just hide/show the ones you want based on the layer type on first run. To know when first run is, have a sentinal parameter that defaults to 0. On the first instance of update UI (when the plugin is first applied) it sets that param to 1 to know that it has handled the first run case. And it can hide and reveal params based on the layer type. 

Community Expert
May 6, 2021

that is a much better solution! we should listen to that shachar.

James Whiffin
James WhiffinCorrect answer
Legend
May 6, 2021

There's way too many Shachars on this forum, you can never know which one to trust.

Community Expert
May 4, 2021

well... yes, but not elegantly.

you can't change the actual default value. these are set on PARAM_SETUP, and can't be changed dynamically. what you can do, is have the the new instasnce report it's location to an AEGP, and have that AEGP set new values on the next idle_hook call.