Skip to main content
Richard Rosenman
Inspiring
August 26, 2024
Question

Naming parameters correctly for expressions to work? (SDK)

  • August 26, 2024
  • 1 reply
  • 257 views

Hi gang;

 

I have an idea of the answer but I wanted to verify.

 

When developing plugins, I am assuming it is important to have each and every parameter named uniquely in the actual interfact, correct? If not, when creating an expression and adding the parameter name, if there are multiple instances of the same name, there will be issues, right?

 

There are times when you don't need unique names. In my case, I have a plugin that has a start and end point, under different topics. So I have, for example:

 

Start Point (topic)
Position
Color
Width
etc...
Start Point (end topic)

End Point (topic)
Position
Color
Width
etc...
End Point (end topic)

 

I am assuming that this is not wise and instead you would want unique names for each parameter like so:

 

Start Point (topic)
Start Position
Start Color
Start Width
etc...
Start Point (end topic)

End Point (topic)
End Position
End Color
End Width
etc...
End Point (end topic)

 

Otherwise creating an expression which contains the name "Position", After Effects wouldn't know if it's to refer to the start or the end position.

 

Is this a correct assumption?

 

Thanks,

-Richard

This topic has been closed for replies.

1 reply

Mylenium
Legend
August 26, 2024

Expressions cannot see groups, so indeed having as unique a property name as possible is a good idea. That said, of course people can always use the property index just as well and therefore identical names aren't the end of the world. Plug-ins like Element 3D or Particular are good examples for this, since they are too complex to entirely avoid duplicate names across different groups.

 

Mylenium