Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Hidden Content groups inside a Shape Layer Hierarchy – can anyone explain why this happens?

  • Hidden Content groups inside a Shape Layer Hierarchy – can anyone explain why this happens?

    Posted by Gabriele Bartoli on March 22, 2016 at 2:32 pm

    Hello guys.

    Here is my question. I’ve been playing with hierarchies inside shape layers for a while now, using expressions and all the commands to do so (propertyGroup, propertyIndex and so on). I am having an hard time understanding why I sometimes have to +1 the number I think I need when using propertyGroup(x) to get where I want. Please look at the attached example.

    The expression I am using to get the position of Ellipse Path 1 from Ellipse Path 2 seems to work fine, given that I go up 2 levels and then I use myIndex – 1 to access the previous group. What I would expect when going up 2 levels using propertyIndex(2) is to be at the Ellipse 1 level, but the debug text layer that you can so on top of everything doesn’t agree (you can’t see the rendered output, you’ll have to trust me :P). It says that propertyIndex(2) gets me to an hidden group called “Contents”, while propertyIndex(3) gets me to Ellipse 1.

    In this particular case it is not a big deal; the expression itself works fine. I’ve been using this a lot lately though and this behavior just freaks me out sometimes.

    Does anyone know why this hidden group is there and why is it hidden?

    Thanks a lot!

    Gabriele Bartoli replied 10 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Xavier Gomez

    March 23, 2016 at 7:00 am

    Groups inside shape layers are like shape “sublayers” and as such they also have a “content” property. It has been hidden probably to lighten the ui (less things to expand).

    Now why only hide it instead of get completely rid of it ?
    Apparently it is so for consistency reasons. The properties inside a layer can be of two types: those that can be added/duplicated/renamed/moved/removed, etc, by the user, and those that cannot. The thing is that After Effects does not mix different kinds of properties inside a given property group. This means that there are also two types of groups:

    • groups than cannot accept new properties (the children inside those groups all have a fixed name and cannot be added/removed). Example: “Transform”, “Material Options”, “Layer Styles”,….
    • groups that can accept new properties (the children inside those groups can all be added/removed, etc). Example: “Masks”, “Effects”…

    Again, no mixing. Therefore everytime you see in the GUI a renamable property at the same level as a non renamable property, you can guess somehow that something has been hidden (the parent group of the renamable property).

    In the case of a “Group” inside a shape layer: it has a property called “Transform” (its transform group) that is not renamable, and, at the same level in the gui, all the addable stuff (fill/stroke/etc), but the actual internal stucture is <“Group”> : <“Content”, “Transform”> and the addable stuff is actually children of “Content”.

    Note that in the expression, “content” is not a command, it is actually the group called “content”.
    If in the text layer you put this expression:

    thisComp.layer(“Shape Layer 1”).content(“Ellipse 1”).content.name;

    …you’ll get its name (“Contents”).

    Finally, there is the same situation for animators and selectors in text layers.

    Hopefully, it’s clear (not quite sure). If you are interested, you can find more info on this in the scripting guide (at PropertyBase > propertyType).

    Xavier.

  • Gabriele Bartoli

    March 23, 2016 at 1:16 pm

    Thanks, now it makes a little more sense! I’ll try to keep this in mind.
    I kind of subconsciously figured out when to expect this hidden group to be there, but I was curious for a more reasoned answer to why it was there in the first place!

    Cheers.

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