Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects [ExtendScript] equivalent function to fromComp/toComp in Script.

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

    Posted by Charlie Leroy on August 17, 2014 at 5:38 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 :
    https://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.

    Charlie Leroy replied 11 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • Charlie Leroy

    August 19, 2014 at 3:45 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.

  • Walter Soyka

    August 19, 2014 at 4:00 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   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Charlie Leroy

    August 29, 2014 at 5:58 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 😀

    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!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy