creepmaster
Oct. 22, 2018 03:05:15
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.
juliap
Oct. 22, 2018 18:09:00
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.
creepmaster
Oct. 26, 2018 04:09:29
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.
juliap
Oct. 30, 2018 17:28:03
That should have been maya_colorset_name rather than maya_colorset_current_name. Does it work for you with the name change?
creepmaster
Nov. 8, 2018 08:26:44
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!
xtvjxk123456
March 28, 2019 04:11:52
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?
juliap
March 28, 2019 19:32:17
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”))
xtvjxk123456
April 1, 2019 01:09:06
still not work
I can't figure out why
colorset name in maya still named Cd,Cd2
juliap
April 1, 2019 15:10:07
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
juliap
April 1, 2019 15:50:04
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.
xtvjxk123456
April 9, 2019 00:12:59
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!!
juliap
April 9, 2019 10:30:34
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.