typeName differences depending on app.language

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

I have a script that makes a list of all compositions in the project by testing

Code: Select all

 if(item.typeName == 'Composition') 
A person using the script was having errors and it turned out that the language they are running after effects in would have me write

Code: Select all

 if(item.typeName == 'Komposition') 
Is there a language independant way to test if an item is a composition?
Mike Cardeiro
------------------------------
Animator - Designer
D4 Creative Group
Philadelphia, PA
------------------------------
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Like this:

if (item instanceof CompItem)


Dan
cardeiro
Posts: 31
Joined: March 27th, 2006, 2:03 pm
Location: philadelphia, PA
Contact:

Dan Ebberts wrote:Like this:

if (item instanceof CompItem)

Brill-Yent! Thanks Dan (again), you are like a scripting/expressions cyborg
Mike Cardeiro
------------------------------
Animator - Designer
D4 Creative Group
Philadelphia, PA
------------------------------
Post Reply