The selection is already a component list attribute on the houdiniInputGeometry. Which is effectively a string attribute except that you do a “setAttr -type componentList” instead (which really just validates the syntax). And that way it looks just like any other Maya mesh history node. And we can use MFnComponentListData instead of parsing it ourselves when trying to get groups.
- Sorry but I don't really understand what you are saying there.
There's a multi of int attributes, and we're passing the node id of the input nulls, or merges or the outputs of upstream assets. The input field in the attribute editor isn't an attribute either - we walk the inputs to find the connected nodes and display the unique partial paths of all the upstream geos or assets.
- Not entirely sure I get this either.
Is your concern with specifying component selection on the inputGeometryNode just that we haven't provided convenient UI for setting component selection (except for history assets) ?
Or once we provide such UI, that there is no visual feedback on the asset node and that it's all hidden on the component nodes)?
- In Maya I would expect a button with similar function to Houdini's group node group parameter action button. It would take you to Maya's component selection mode on the previously specified geo and preset the selection if there was one already. Confirm by pressing the same button, another button or pressing enter (up to you).
That the syntax for component selection is Maya syntax and not houdini syntax?
- That could be expected but whatever it is, it should be clearly explained in the Maya Houdin Engine docs (with examples).
That we create a an explicit group (especiall with a hardcoded name) rather than being to pass the selection directly to some group specification on some node in your asset?
- Not sure what you are referring to. Is there a good documentation on this?
Putting the component selection on the houdiniAsset node would be problematic because the asset node doesn't have access to the mesh data directly and you can have multiple meshes coming in though a merge. The asset has no knowledge of the ordering of the inputs and the merged geo is not accessible in maya so then there isn't a straighforward way to build a houdini-style selection specification with the component indexing remapped to the merged mesh.
Maya's component selection looks something like:
select -d pCylinder1.f pCylinder1.f ;
select -add pCylinder1.f pCylinder1.f ;
select -tgl pCube1.f ;
select -tgl pCylinder1.e ;
In other words, each component has a unique identifier. Just use Maya's internal systems and translate something like pCylinder1.e to something that Houdini would understand. It would not care about merges or order or whatever.
How about it we modify the scripts used by the setToSelection buttons to recognise component selection, and set up the component lists on the houdiniInputGeometry nodes. We could display the component list in the attribute editor for on the houdiniInputGeometry node (It's hidden right now), and provide some kind of feedback in the assetNode's input field in the AE that an input has component selection. We could add an attribute for a user-specified group name as well, if the hard coded group name is a problem
- Personally, I would make one input with all of objects that have been detected in all component selection parameters. The objects would have a name attribute that has the value of their original Maya name.
For each component selection parameter, for each detected component selection in it, we generate a group of the corresponding type (faces/primitive, points, vertices, edges) and the name of the group is the name of the component selection parameter.
Does that make sense?