- Added the ability to pass component selections into Houdini string parameters.
Specifying the new “sidefx::maya_component_selection_type” tag on a string parm will now instruct Maya that it should accept component selections of the given type. The format that Maya will pass back to Houdini is the same as what is expected by the Group SOP.
One usage of this is to pass a component selection into Houdini as a group. To do this, you would promote the “Group Base” parm from the group node to the HDA. Then in the Edit Operator Type Properties window, add the tag “sidefx::maya_component_selection_type”. (In Houdini 18+ you can choose it from the “Built-in Tags” button). The tag's value should be either “vertex”, “face”, “edge” or “uv”. Make sure that your group is operating on the same type.
If you are just promoting the “Base Group” parm, you will need to edit the “script_action” tag as well. In the Parameter Description, choose the Action Button panel, and enter:
import soputils kwargs['inputindex'] = 0 kwargs['geometrytype'] = hou.geometryType.Points soputils.selectGroupParm(kwargs)
Replacing hou.geometryType.Points with either Points, Primitives or Edges depending on your selection type.
I have attached an example HDA that will set the vertex color of the selected vertices, as well as deform them with a mountain SOP.
What's new in Houdini Engine for Maya5300 8 1
New in 17.5.581/18.0.430
Edited by johnmather - April 7, 2020 17:10:31
New in 17.5.587/18.0.435
- Parameter help strings are now displayed as tool-tips in the Maya Attribute Editor.
If you hover over an attribute in the Maya attribute editor and the corresponding HDA's parameter has a help string defined for it, it will now be shown in both a tool-tip as well as in Maya's help line.
New in 17.5.661/18.0.509
- Parameters that modify others can now trigger an attribute sync when modified.
Specifying the new “sidefx::maya_parm_affects_others” tag on a parm will now instruct Maya that it should perform an attribute sync whenever it is modified. This is mainly used when a parm callback modifies the state of other parms.
New in 18.0.946/18.5.701
- The PYTHONPATH environment variable can now be cleared before starting.
Added the option to clear the PYTHONPATH variable before starting the Houdini Engine server, and when the asset is viewed in Houdini via the "View Assets in Houdini" menu item. In certain cases, importing certain python modules in Maya could cause conflicts when the Houdini Engine server starts.
New in 18.5.718
- Maya callbacks can now be executed when parms are modified.
Added the sidefx::maya_parm_callback_func and sidefx::maya_parm_callback_func_language built-in tags. These tags allow the user to define a Maya callback that should be called when the associated parm is modified.
To trigger a Maya script when a parm is modified, the built-in sidefx::maya_parm_callback_func tag must be defined on the parm. This instructs Maya which function should be called when the parm is changed. Both MEL and Python functions are supported, however MEL is the default. If you wish for a Python function to be called, you must additionally include the sidefx::maya_parm_callback_func_language built-in tag on the parm and set its value to python.
In both languages, the callback function must receive a single argument. This argument will hold the source of callback. Eg. if the parm parm on the Houdini asset foo1 is modified, it will pass "foo1.houdiniAssetParm_parm__button" to the callback function specified by sidefx::maya_parm_callback_func. Therefore callback functions should be defined as the following:
global proc myCallback(string $plug)
print("Caught message from " + $plug + "!\n");
print('Caught message from ' + plug + '!')
In this case, sidefx::maya_parm_callback_func would have been defined as myCallback, and sidefx::maya_parm_callback_func_language would have been defined as either Python or (optionally) MEL.
- Quick Links