Skip to main content
CLWill
Inspiring
September 16, 2021
Question

Accessing the essentialProperty() function for a Comp

  • September 16, 2021
  • 1 reply
  • 1438 views

I'm having fun with the Essential Graphics panel, and the ability to create reusable components. Coupled with power in expressions, this stuff is amazing.

 

I've run into an issue, though. With the Essential Graphics panel you create "Essential Properties" for a comp. You can reference these with the powerful .essentialProperty() function. Great!

 

The problem becomes that you can only use .essentialProperty() on a layer, not on a comp. But the Essential Properties are a feature of a comp, not a layer. So now I have to somehow reference the parent where the comp is used, then the layer that is the comp I'm in, then the properties. So you end up with:

 

    comp("parentComp").layer(thisComp.name).essentialProperty("whatever");

 

But... there is no parentComp() function. So at run time who knows what the containing Comp is called? And any attempt to reference the .essentialProperty() function on a Comp fails, such as thisComp.essentialProperty() or comp("whatever").essentialProperty(). It has to be a layer, for some reason. Even though essential properties are an element of the comp.

 

Does anyone know a workaround for this? This seems like a huge oversight in the creation of Essential Properties.

This topic has been closed for replies.

1 reply

Mylenium
Legend
September 17, 2021

You have a misunderstanding. Why should/ could there even be such a thing as parentComp(), given that any comp can be used a million times as a sub-comp across different comps and different nesting levels?! See the problem? This would simply cause a logic paradox and that pretty much is a clear reason why there can never be such a function unless they completely change that stuff and e.g. expose the internal IDs/ magic numbers AE uses to check dependencies. So no, there is no way to do any of that, at least at the moment.

 

Mylenium

CLWill
CLWillAuthor
Inspiring
September 17, 2021

Wow, missed the point entirely. I completely understand that there can't be a parentComp() function. That WAS the point.

 

Because you can't do that, there is no generic way to access the .essentialProperties() for the current comp. Those Essential Properties are an element of the comp, you create them on the comp. But because you can only do .essentialProperty() on an instantiated layer, there is no generic way to access them.

 

The point is that .essentialProperty() should not be a function of a layer, but rather of a comp. You should be able to say thisComp.essentialProperty() or comp("fred").essentialProperty().

 

As it now stands, the inability to do what you just said is impossible, is precisely the reason why having .essentialProperty() be a function of a layer IS the problem. There is NO way to say parentComp.thisLayer.essentialProperty() exactly because of the issue you point out.