ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

[ExtendScript] equivalent function to fromComp/toComp in Script.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Charlie Leroy
[ExtendScript] equivalent function to fromComp/toComp in Script.
on Aug 17, 2014 at 5:38:34 pm

Hello guys,

I am new to Scripting in ES and I am trying to figure out how to link a null to any value selected.
I achieved that already, I have a nice UI with a text field and un button which create the null linked to the property ( mainly position of object).

Sadly, it seems that if the object is parented to something else, it get crazy.
after looking around i found this expression :
http://www.motionscript.com/design-guide/threeD-corner-pin.html
it uses fromComp and toComp. those functions are exactly what I need!

It works in expression field but debugger tells me "function undefined" if I put it in my script.

is there a equivalent in extend script? I can not find it anywhere... :s
(or maybe It is not the good way to go?)

thanks a lot.


Return to posts index

Charlie Leroy
Re: [ExtendScript] equivalent function to fromComp/toComp in Script.
on Aug 19, 2014 at 3:45:07 am

I am progressing on this,
now I am able to create a Null and position it correctly on a puppet pin.
My only problem now is that If the layer(with the pins) is parented to something, I have no idea how to get the Comp coordinates ( the ones that takes in account the shift due to parenting).

I have been able to find this phrase by Dan Ebberts:
if you're dealing with parenting, rotation and/or 3D. You may need to temporarily add a Point Control with a layer space transform expression to do the space conversion and harvest the result.

I am a bit lost here about how to do this in Script?, any hint?

thanks.


Return to posts index

Walter Soyka
Re: [ExtendScript] equivalent function to fromComp/toComp in Script.
on Aug 19, 2014 at 4:00:22 pm

Dan is suggesting that you have your script add the point control, add the expression you want to the point control, ask for the value of the point control (post-expression), then delete the point control.

Basically, since you can't do this directly via scripting, you have to create the expression via the script, let it evaluate, get its value, and clear it out like it was never there.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index


Charlie Leroy
Re: [ExtendScript] equivalent function to fromComp/toComp in Script.
on Aug 29, 2014 at 5:58:01 pm

Thanks Walter,
sorry for the late answer.
I am moving on on this, I managed to do the "transfert" using a 3dPointControl... and it worked :D

so I am almost done the system is working fine.
However, I cant find a way to remove the 3D point after getting its coordinates.
to add it I use addProperty but I can not find such thing as removeProperty.
is there a function that can do this?

In general it is very difficult to find the exact syntax of the functions I want, the Object viewer is not helping at all and I can not find any reference of removing a property in JS tool guide.
did I miss some important document?

thank you for your help!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]