CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 09-22-2005, 10:39 AM   #1
SweeKim Lai
Character Surfacing Artist
Singapore, Singapore
Join Date: May 2004
Posts: 60
attribute existence

hi all,
I am trying to use attributeExists to find out if the attribute is there in the scene. Such as:

attributeExists "noise" "ramp1";

it returns 1, that works fine, however if i do this:

attributeExists "colorEntryList[1].position" "ramp1";

it returns 0 even if it exists under the ramp node.

I guess its because of the position attribute is hidden deeper than other attribute, which cannot be seen by the script. I have found out the way to display the number of entries in colorEntryList. However, it does not mean that all entry index starts with 0. Thus, I just need to find out a way to check if the colorEntryList[0] exist under the ramp node.

Thanks in advance.....

Old 09-22-2005, 09:38 PM   #2
James Gaczkowski
Join Date: Jul 2002
Posts: 197
Thumbs up

int $pExists = `attributeExists "colorEntryList.position" "ramp1.colorEntryList"` ;
int $cExists = `attributeExists "colorEntryList.color" "ramp1.colorEntryList"` ;

Old 09-22-2005, 09:38 PM   #3
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:06 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.