• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

why is this not working trying to remove a control name

Explorer ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

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/

 

TOPICS
Expressions , Scripting

Views

121

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 06, 2022 Jun 06, 2022

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines