New Attribute to change texture Image Name Paths

New Attribute to change texture Image Name Paths

Anonymous
Not applicable
826 Views
3 Replies
Message 1 of 4

New Attribute to change texture Image Name Paths

Anonymous
Not applicable
Hello All,

I am wanting to create a new attribute on a nurbs curve controller, that will switch my texture from a lo res... to a hi res version. I want to avoid having 2 texture file nodes in my file.... with that methiod i could create a sdk using a color blender utility. I am able to write a script that changes the texture file... but this requires me having to have an additional gui or a shelf button. Is there a way that I can attach a script to an attribute in my channel box that changes the texture file i am sourcing? Please Help.

Thanks
0 Likes
827 Views
3 Replies
Replies (3)
Message 2 of 4

Cory_XD
Autodesk
Autodesk
I wrote something up about that here: area.autodesk.com/forum/index.php/blogs_cory/blog_detail/swapping_file_textures/
Cory "Mr. Entertainment" Mogk
http://area.autodesk.com/blogs/cory
0 Likes
Message 3 of 4

Anonymous
Not applicable
well, the expression part isn't working here....it always evaluates to the else statement...I have tried many things....but no luck so far.....maya2008...it appears the enum names are not coming thru....so I have to use integer values of the enum and I also have to change evaluation to "always".
0 Likes
Message 4 of 4

Anonymous
Not applicable
i'm new to mel but isn't/wasn't enum always some sort of an integer? so actually when you query it, it will always return an integer.
so far i've learned that if you want the name behind the enum you have to query it through addAttr -q -enumName.
if you loop the name you could make it work, but the question is: do you really want the name? it is so much easier to work with just the returned integer.
0 Likes