Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects scripting, trackMatteType

  • scripting, trackMatteType

    Posted by Scott G on March 26, 2006 at 7:50 am

    how does one go about setting the trackMatteType in a script?
    TrackMatteType.ALPHA = true doesn’t work, neither does anything else i try.

    there is a severe lack of afx scripting resources around!! even on ae enhancers and motionscript.com, there is not a single mention of this or a large number of other properties/attributes/etc.

    the afx scripting guide tells me that the keywords i need are TrackMatteType etc etc, but not how to implement them. having a big list of keywords and not knowing how they all slot together is getting frustrating. i’ve been able to get by so far with my background in PHP, but some things (like setting a track matte) i’m finding to be completely non-intuitive and my PHP background doesn’t help me at all.
    🙁

    Jeff Almasol replied 20 years, 1 month ago 2 Members · 5 Replies
  • 5 Replies
  • Scott G

    March 26, 2006 at 8:26 am

    why the heck does
    myadd02.blendingMode = blendingMode.ADD;
    work, but
    myadd02.trackMatteType = trackMatteType.ALPHA;
    say that trackMatteType is undefined??

    AAARRRGGGHHH!!!

  • Scott G

    March 26, 2006 at 8:45 am

    it works if you say
    myadd02.trackMatteType = TrackMatteType.ALPHA;
    instead of
    myadd02.trackMatteType = trackMatteType.ALPHA;

    notice how one uses a capital T?

    but for blending modes, it works when they’re both lowercase.
    that’s inconsistent!

    can someone please explain why this inconsistency works and is necessary???????????????????????????????
    completely non-intuitive.
    ARGH.

  • Jeff Almasol

    March 26, 2006 at 8:49 am

    Hi Scott,

    You need to use TrackMatteType.ALPHA (note the initial capital T), which should be how it’s listed in the doc.

    Your blendingMode.ADD example doesn’t work for me (I get a “blendingMode is undefined” message). Maybe you have a blendingMode variable earlier in your script?

    Jeff

  • Scott G

    March 26, 2006 at 9:57 am

    Hi Jeff,

    Heh, I thought you only lurked on the AE Enhancers forum.

    I think I’m going crazy, as I tried the blending mode one again with the lowercase and you’re right, it doesn’t work. Too many hours staring at the screen.

    I see now it is listed with a capital in the script guide, I wasn’t paying attention to the 2nd column in the index of properties at the back of the guide, and in the main section of the guide I guess I wasn’t paying attention either.
    I assumed that all the properties started with lowercase letters, and over the past few days I got used to typing all these firstword-lowercase names, it didn’t click with me that you had to use the captial when setting as opposed to the lowercase when referring to it.

    sheepish,
    scott.

  • Jeff Almasol

    March 27, 2006 at 12:32 am

    Scott,

    Note that blendingMode and trackMatteType are attribute of the AVLayer object (accessed as .blendingMode and .trackMatteType from your layer variable), but BlendingMode.ADD and TrackMatteType.ALPHA are enumerated values that you either assign to these attributes or retrieve from them. Their names (TrackMatteType vs. trackMatteType) are similar, but their usage is not defined by whether it’s initially capitalized or not. The enumerated value could’ve just as easily been defined as myTrackMatteTypes.ALPHA, it’s just a similar name and initial cap syntax was used to make the association with the attribute that would use it.

    Jeff

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