Cannot get maya_colorset_name[] to work

   5027   11   1
User Avatar
Member
13 posts
Joined: April 2011
Offline
Hi, I was following the doc https://www.sidefx.com/docs/maya/_maya__mesh.html#Maya_Mesh_MultiplePieces_Output. [www.sidefx.com]
I can make color set name to works when it is a single entry, but I have a problem with the array. The color set data in Maya was correct, but the name reverted back to Cd, Cd2 instead.
Is there anything I missed?
I'm using Houdini 16.5.473, 10 Maya 2017, and engine 16.5.473 on win 10.
Edited by creepmaster - Oct. 22, 2018 03:06:53

Attachments:
sheet2.PNG (23.6 KB)
sheet1.PNG (85.4 KB)
sheet3.PNG (34.5 KB)

User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.
User Avatar
Member
13 posts
Joined: April 2011
Offline
juliap
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.

Thanks Juliap, I went back and make it Tuple in Python SOP. But still, Maya wont read it.
Edited by creepmaster - Oct. 26, 2018 04:09:45

Attachments:
Capture.PNG (26.6 KB)

User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
That should have been maya_colorset_name rather than maya_colorset_current_name. Does it work for you with the name change?
User Avatar
Member
13 posts
Joined: April 2011
Offline
juliap
That should have been maya_colorset_name rather than maya_colorset_current_name. Does it work for you with the name change?

That fixed it Juliap. Thanks!
User Avatar
Member
3 posts
Joined: May 2018
Offline
creepmaster
juliap
The problem is the the color attributes that the plugin uses are string tuples and not string arrays. It was done that way because HAPI supported string tuples and not arrays. And we don't support string tuples in attributeCreate because string tuples are not commonly used by many other Houdini nodes. So if you want to set up the color set name mapping for geo that originates in Houdini and not from a a Maya input, the easiest way is probably to add those detail attrs in a python node.

Thanks Juliap, I went back and make it Tuple in Python SOP. But still, Maya wont read it.


sorry, I can't make that work, can you show me some detail?
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
My Sop for adding the color set name mapping attrs to geometry that originated in houdini looked something like this:

cs_mapped_Cd = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Cd”, “Cd”)
cs_name = geo.addAttrib( hou.attribType.Global, “maya_colorset_name”, “NewCol”)
cs_mapped_Alpha = geo.addAttrib( hou.attribType.Global, “maya_colorset_mapped_Alpha”, “Alpha”)
cs_mapped_Cd.setSize(2)
cs_name.setSize(2)
cs_mapped_Alpha.setSize(2)
geo.setGlobalAttribValue(“maya_colorset_mapped_Cd”, (“Cd”, “Cd2”) )
geo.setGlobalAttribValue( “maya_colorset_name”, (“NewCol”,“NewCol11”))
geo.setGlobalAttribValue( “maya_colorset_mapped_Alpha”, (“Alpha”, “Alpha1”))
User Avatar
Member
3 posts
Joined: May 2018
Offline
still not work
I can't figure out why

colorset name in maya still named Cd,Cd2
Edited by xtvjxk123456 - April 1, 2019 01:10:42

Attachments:
Snipaste_2019-04-01_13-07-19.png (29.7 KB)
Snipaste_2019-04-01_13-05-43.png (29.4 KB)

User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
OK, my graph was slightly different, I used a python geometry asset rather than a python node, my color attrs had alpha, and I didn't bother setting the current color set. Can you repost the image of your spreadsheet with the entire names showing? If there's nothing obviousI can look at migrating my graph towards yours and see when it breaks. There's at least one outstanding bug related to alpha that I ought to take a look at anyway
Edited by juliap - April 1, 2019 15:17:25

Attachments:
okmap.jpg (24.7 KB)

User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
Yeah, looks like it loses the mapping if the Alpha isn't also specified. The default color set type that it creates in maya is RGBA, but it should respect the presence/absence of Alpha and/or size of the color attr (since it seems likely that it's bailing early somewhere due to the lack of alpha, and missing out on the name remapping - I will take a look) - I guess I've gotten into the alpha setting habit cause that's what Maya expects.

J.
Edited by juliap - April 2, 2019 11:14:56
User Avatar
Member
3 posts
Joined: May 2018
Offline
juliap
Yeah, looks like it loses the mapping if the Alpha isn't also specified. The default color set type that it creates in maya is RGBA, but it should respect the presence/absence of Alpha and/or size of the color attr (since it seems likely that it's bailing early somewhere due to the lack of alpha, and missing out on the name remapping - I will take a look) - I guess I've gotten into the alpha setting habit cause that's what Maya expects.

J.
You're right, it works fine now.
color set name can be renamed correctly
Thanks!!
Edited by xtvjxk123456 - April 9, 2019 00:13:19
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
Fixed in 17.5.222 - you need to set up the mapping for the channels you actually have - if you just have RGB or just Alpha. Also, it will now respect the color representation of the maya color set coming in, or you can set the maya_colorRep attribute (to RGBA, RGB, or A) to specify your own color representation for Maya.
  • Quick Links