Skip to main content
Bram Hoekstra
Inspiring
Aug 11, 2021 11:07 PM UTC
Answered

target separated position dimensions in AE Script?

Heey,

 

I'm wandering how to target separated position dimensions in a AE Script.

 

I separated the position dimensions with ".position.dimensionsSeparated = true" and want to apply expressions to each value.

 

I know I can add the different expressions in one expression, but it is eassier and more efficient to code it this way in this case.

 

Does anyone know how to apply expressions to the position dimension values after they have been separated?

 

Thank in advance for the reactions!

Mathias Moehl
Mathias MoehlCorrect answer
Community Expert
Aug 14, 2022 10:03 AM UTC

Yes, if you want to do it manually, you can do it via the context menu of the property. If you want to do it with a script, you need the dimensionSeparated attribue.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

5 replies

Mathias Moehl
Community Expert
Community Expert
Aug 12, 2021 7:04 AM UTC

Say that your position property is stored in the variable "pos".

Then pos.getSeparationFollower(0) will give you the property for the x value and pos.getSeparationFollower(1) will give you the property for the y value. You can apply expressions to them as you can for any other property, i.e.

pos.getSeparationFollower(1).expression = "value+1";

 

See

https://ae-scripting.docsforadobe.dev/properties/property/#property-getseparationfollower

 

If your dimensions are not separated, yet, you should do

pos.dimensionsSeparated = true;

before you try to assign any expressions to the separated dimensions.

Translate
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Participant
Aug 14, 2022 8:10 AM UTC

right click separate dimensions  on the position parameter on the timeline?

Translate
Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
Aug 14, 2022 10:03 AM UTC

Yes, if you want to do it manually, you can do it via the context menu of the property. If you want to do it with a script, you need the dimensionSeparated attribue.

Translate
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Mylenium
Legend
Aug 12, 2021 6:55 AM UTC

I'm not clear what specifically you are asking. You add them like any other property. You would only need an extra check onj whether the properties are actually separated just in case...

 

Mylenium

Translate