However if I put the asset inside a subnet and then try to promote the multiparm by using the ‘from nodes’ tab, I get an error saying that no method called ‘generateContextMenu’ is found in the python module. Now if I try the same thing with an identical parameter on the asset that is not inside a multiparm everything works like a charm.
Is there a way around this issue? Am I doing something wrong.
hou.pwd().hm() refers to this node's python module. If you promote it to another node, then it won't be called from the node with the module you want anymore.
The path of evaluation could be different, I'm not really sure. But you can hard code the path to the node with the HDA module. Or instead of a path to a node, you can supply a node type with hou.nodeType(), and fetch the hdaModule from the NodeType object.
It seems that the parameter containing the call to .pwd is returned rather than the parameter of the node that references the original parameter in order to maintain relative referencing. Seems this might be an issue with multiparms after all.
The only solution I have found is to duplicate the code on the referencing parameter to point to the HOM of the node it is referencing. Ugly, but functional-ish.