Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Invalid Object error when script tries to locate specific effect parameter

  • Invalid Object error when script tries to locate specific effect parameter

    Posted by Dirk De jong on January 12, 2018 at 12:16 am

    I have a script that stops running with an Invalid Object error as it is attempting to to apply an expression to an effect parameter. I have several other instances of this sort of thing that seem to be working fine and I’m trying to figure out how to fix this one… The effect is the standard AE Exposure effect (“ADBE Exposure2”) and the parameter it’s trying to find is the parameter called “Exposure”. The only thing I see that is at all “different” is that the parameter is within a param group (called “Master”)… The default expression seems to show the index for this parameter to be (3)… I’ve tried it by index or by name with the same problem either way… – what am I missing here ? (any suggestions appreciated)…

    The syntax in the script is like this
    myEffect02.property(3).expression = ‘whatever expression’
    with myEffect02 as a properly defined variable referring to the instance of the Exposure effect…

    Dirk De jong replied 8 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 12, 2018 at 12:26 am

    Have you possibly added or deleted other effects after defining the variable that references the effect receiving the expression? That would probably invalidate the object reference.

    Dan

  • Dirk De jong

    January 12, 2018 at 3:23 am

    [Dan Ebberts] “Have you possibly added or deleted other effects after defining the variable that references the effect receiving the expression?”

    Yes, that was it. I (the script) had added another effect… and I wasn’t even aware that would necessarily be a problem. I guess I had happened to never do it in that order before (because I had done this quite a bit and never had the problem before)… Thanks for the quick reply (and solution)

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