ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Preseted style quick setup

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gleisson Andrade
Preseted style quick setup
on Jun 2, 2018 at 8:41:47 pm

Hi guys!
I'm setting up a character tool in after effects and I want to apply a quick menu of defined styles. For simple configuration function is working perfectly.

maxN=comp("_Character - CUSTOMIZER").layer("limits").effect("Style Body")("ADBE Slider Control-0001");
res=value;
if (value<0) res=0;
if (value>maxN) res=maxN;
try{
chN=effect("character_number")("ADBE Slider Control-0001").value;
if (chN>0 ){
if (chN<10) chStr="_Character - CUSTOMIZER " +"00"+ chN.toString();
if (chN>9 && chN<100) chStr="_Character - CUSTOMIZER " +"0"+ chN.toString();
if (chN>99 && chN<1000) chStr="_Character - CUSTOMIZER "+ chN.toString();
thisComp.layer(chStr).effect("Style Body")("slider");
}
else res;
}
catch(err){res};


For the defined styles function I used one more "if" in this code but it did not work.

maxN=comp("_Character - CUSTOMIZER").layer("limits").effect("Style Body")("ADBE Slider Control-0001");
res=value;
if (value<0) res=0;
if (value>maxN) res=maxN;
try{
chN=effect("character_number")("ADBE Slider Control-0001").value;
if (chN>0 ){
if (chN<10) chStr="_Character - CUSTOMIZER " +"00"+ chN.toString();
if (chN>9 && chN<100) chStr="_Character - CUSTOMIZER " +"0"+ chN.toString();
if (chN>99 && chN<1000) chStr="_Character - CUSTOMIZER "+ chN.toString();
if (thisComp.layer(chStr).effect("QUICK SETUP ON/OFF")("checkbox")==1) thisComp.layer(chStr).effect("Preset Style Number")("slider") else thisComp.layer(chStr).effect("Style Body")("slider");
}
else res;
}
catch(err){res};


How could I adjust the code to work?
Please, if anyone knows how to do it, help me. Thank you!


Return to posts index

Dan Ebberts
Re: Preseted style quick setup
on Jun 3, 2018 at 7:52:53 am

I'd comment out the try/catch and see what kind of error message you get.

Dan



Return to posts index

Gleisson Andrade
Re: Preseted style quick setup
on Jun 3, 2018 at 10:03:11 am

Hi Dan!
No messages appear. It's like it's working normally, but it does not work.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]