View Full Version : Custom attribute connected to file texture node: Broken?

03 March 2006, 07:15 AM
I'm trying to connect a file texture node to a material node's custom attribute, it doesn't seem to be working. :)

I'm in the midst of developing a plugin and part of the plugin creates custom attributes on various material nodes and allows the user to hook up file texture nodes to them. At the surface this appears to work but UV linking seems to be broken as a result. Once the file texture node is connected to my custom attribute, the relationship editor (UV-Centric UV Linking) doesn't allow me to actually select the UV set name and file node name. It highlights the file node name for a second and then unselects it. If the same file texture node is connected to one of my custom attributes *and* one of Maya's native attributes, then everything starts as expected (uv set names can be linked with file texture nodes and all is well).

Just to make sure I wasn't doing something wrong in my plugin, I've created a Lambert material and used the attribute editor to add a custom attribute (vector) and then hooked a file texture node up to it. Same exact results. I've done this all using standard Maya UI without even loading my plugin.

At first I thought this might just be a UI bug in Maya, I figured it was possible that Maya was doing the right thing it just wasn't drawing the selection highlight bars in the relationship editor... but it's more than a UI bug because it results in MFnMesh::getAssociatedUVSetTextures() always returning a zero length object array. Basically Maya doesn't know what UV set is being used with the file texture node (to be exact, Maya thinks that the UVSet isn't used with any textures). Again, when the file texture node is hooked up to both my custom attribute and a maya native attribute... then it all starts working again!

So, my questions is... what magic do I have to perform to get file texture nodes to correctly hook up to custom attributes on a material node and still get uv linking to work?

Thanks! --Chris

P.S. I'm using Maya 7.0

CGTalk Moderation
03 March 2006, 07:15 AM
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.