That worked! I ended up using your recommended method and now the asset holds up when “Match Current Definition” is selected!
A few additional learns in case other people find this and are working through the same issue: Once I was correctly referencing the detail attribute instead of setting the node value directly in Python, I was still getting an incorrect result when selecting “Match Current Definition. I realized it was matching a previously saved definition and I needed to ”Save Operator Type“ to have it save the current, now corrected, contents of the HDA. Once I did that, it displayed correctly when I selected ”Match Current Definition".
Citing http://www.sidefx.com/docs/houdini13.0/hom/hou/HDADefinition [sidefx.com]:
updateFromNode(self, node)
Update and save the definition to match the contents of a given unlocked instance of the asset. Calling this method is the same as selecting Save Operator Type on the node’s menu.
Additionally the attribute I was needing to create and access from the detail level was a string and detail() wasn't working - I found it needed to be details() in order to return the string attribute.
A good resource to learn about all of the expression functions which I found by researching detail()
http://www.sidefx.com/docs/houdini13.0/expressions/ [sidefx.com]
Thank you SO much for your help, that is a huge concept to pick up and I'm back on track!
Found 23 posts.
Search results Show results as topic list.
Houdini Engine for Maya » Houdini Python SOPs not loading in Houdini Engine for Maya
- davidderwin
- 23 posts
- Offline
Houdini Engine for Maya » Houdini Python SOPs not loading in Houdini Engine for Maya
- davidderwin
- 23 posts
- Offline
Hi Gray,
Thank you for your reply! My python code is indeed setting parameters in nodes inside the digital asset network. The asset works when it is editable and it throws an error that the python operator failed to cook when “match current definition” is selected.
Is there a way to manipulate parameters of nodes within the digital asset network via Python and have it work when the asset is locked and no longer editable?
Thank you for your reply! My python code is indeed setting parameters in nodes inside the digital asset network. The asset works when it is editable and it throws an error that the python operator failed to cook when “match current definition” is selected.
Is there a way to manipulate parameters of nodes within the digital asset network via Python and have it work when the asset is locked and no longer editable?
Houdini Engine for Maya » Houdini Python SOPs not loading in Houdini Engine for Maya
- davidderwin
- 23 posts
- Offline
I have a digital asset which contains several Python SOPs that manipulate the geometry in various ways and am having issues getting it to load in Maya via Houdini Engine.
Maya throws the following error:
/obj/createModule1/createModule1/ModuleDivide:
Error: Python error: Traceback (most recent call last):
File “<stdin>”, line 40, in <module>
File “<stdin>”, line 38, in moduleDivide
File “/Library/Frameworks/Houdini.framework/Versions/13.0.509/Resources/houdini/python2.7libs/hou.py”, line 48086, in set
return _hou.Parm_set(*args)
PermissionError: Failed to modify node or parameter because of a permission error. Possible causes include locked assets, takes, product permissions or user specified permissions
Has anyone encountered this? Is there a way I need to “pack” my python SOP code into the digital asset or should I be able to have python SOPs in digital assets for Houdini Engine for Maya? Is Maya trying to use its own Python library and not Houdini's?
Just so I have the proper workflow as well, is there any difference between Python SOPs and a new operator type –> Python other than one is mean to be reused easily and the other is for one off changes? Is there any advantage specifically for Houdini Engine for Maya to use one method vs the other?
Additionally should I be saving my Houdini Engine for Maya digital assets somewhere outside Library/Preferences/houdini/13.0/otls in order to avoid possible permissions issues or should that not be a problem for Maya?
Tech Specs:
Houdini Indie 13.0.509
Maya 2015
Mac 10.8.5
Thanks!
Maya throws the following error:
/obj/createModule1/createModule1/ModuleDivide:
Error: Python error: Traceback (most recent call last):
File “<stdin>”, line 40, in <module>
File “<stdin>”, line 38, in moduleDivide
File “/Library/Frameworks/Houdini.framework/Versions/13.0.509/Resources/houdini/python2.7libs/hou.py”, line 48086, in set
return _hou.Parm_set(*args)
PermissionError: Failed to modify node or parameter because of a permission error. Possible causes include locked assets, takes, product permissions or user specified permissions
Has anyone encountered this? Is there a way I need to “pack” my python SOP code into the digital asset or should I be able to have python SOPs in digital assets for Houdini Engine for Maya? Is Maya trying to use its own Python library and not Houdini's?
Just so I have the proper workflow as well, is there any difference between Python SOPs and a new operator type –> Python other than one is mean to be reused easily and the other is for one off changes? Is there any advantage specifically for Houdini Engine for Maya to use one method vs the other?
Additionally should I be saving my Houdini Engine for Maya digital assets somewhere outside Library/Preferences/houdini/13.0/otls in order to avoid possible permissions issues or should that not be a problem for Maya?
Tech Specs:
Houdini Indie 13.0.509
Maya 2015
Mac 10.8.5
Thanks!
-
- Quick Links