ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

check if property exists

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
rami yaron
check if property exists
on Oct 23, 2019 at 8:12:17 pm

Can I test if a layer property exists, to avoid exception raising?
The following code doesnt work, still raises an exception:
if(typeOf(Layer.timeRemap)=='undefined')


Return to posts index

Dan Ebberts
Re: check if property exists
on Oct 23, 2019 at 8:45:35 pm

First, I think it would be typeof, not typeOf, but I think you'd be better off with try/catch:


try{
Layer.timeRemap;
}catch(e){
// do something else
}



Dan



Return to posts index

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