how to test if an attribute exist?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
jerry7
Posts: 45
Joined: 22 May 2010, 01:43

how to test if an attribute exist?

Post by jerry7 » 03 Aug 2010, 09:39

hi, how to test if ice attribute exist or not initialized?

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: how to test if an attribute exist?

Post by Mathaeus » 03 Aug 2010, 11:29

Hi,

just if attribute exist, I think you can't (successfully) test this, at least in ICE tree. Once you have get data node that has defined context, your attribute actually exists.

But, if you know what value you can expect from your attribute, you can do some logic with output, for example, if it's not zero, then....

At least that's my understanding.....

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: how to test if an attribute exist?

Post by xsisupport » 03 Aug 2010, 12:41

You could do something like what the Get Texture Map Color compound does with First Valid.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: how to test if an attribute exist?

Post by Mathaeus » 03 Aug 2010, 20:17

hi,

just another one from 'first valid' creativity... this will return true if curve is plugged into the port, and false if doesn't

Image