Skip to main content
Inspiring
June 6, 2022
Question

why is this not working trying to remove a control name

  • June 6, 2022
  • 1 reply
  • 336 views

this works.

if (layer.property("Effects").property(i).matchName == "ADBE AutoColor") {

 

this is part of the code another part of the code is not needed as the code above works.

 

this don't work.

i have a slider controller named  Time

if (layer.property("Effects").property(i).matchName == "ADBE Time") {

if (layer.property("Effects").property(i).matchName == "ADBE Slider Control Time") {

if (layer.property("Effects").property(i).matchName == "ADBE:Time") {

non work

now according to this

 yuelili.com/docs/ae-script/built-in-effect-matching-name/

 

This topic has been closed for replies.

1 reply

Inspiring
June 6, 2022

The matchname is AE's internal name for the effect. It has no relation to any name you might call it.

if (layer.property("Effects").property(i).matchName == "ADBE Slider Control") {

 

A simple alert will tell you what it is, but if you can get hold of Jeff Almasol's script GimmePropPaths that will come in handy.

alert(layer.property("Effects").property(i).matchName);

Inspiring
June 6, 2022

thanks, i have done this now. it works removes all the controls rather than specific ones how come.

Inspiring
June 6, 2022

You've not really shown your code or said what you're trying to do. Perhaps you mean it's removing all Slider Controls when you just want it to remove the one you called Time?

 

var theProp = layer.property("Effects").property(i);

if (theProp.matchName == "ADBE Slider Control" && theProp.name = "Time") {

 

Whether you really need to check if it's both a slider control and called Time I can't really say.