permissions issue trying to execute height-field output node embedded in hda

   4733   6   1
User Avatar
Member
82 posts
Joined: Aug. 2006
Offline
I have a heightfield_output node embedded in an HDA, I have a script that works fine until i get to the part where I need to “press the button” to save out the heightfield.

here is my command in python:
hou.node("heightfield_output").parm("execute").pressButton()

if I unlock my HDA it executes just fine, if i lock my HDA i get a permission error?
Not sure what i am doing wrong, i even looked into the heightfield_output node itself and it uses the same command in order to “press the button” and we dont have to unlock that node for it to work? thanks in advance.

here is the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "opdef:/Sop/heightfield_output?PythonModule", line 11, in execute
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.459/houdini/python2.7libs\houpythonportion\Parm.py", line 62, in set
    self._set(value)
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.459/houdini/python2.7libs\hou.py", line 43262, in _set
    def _set(*args): 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
Edited by asmischney - March 21, 2019 16:16:03
User Avatar
Member
82 posts
Joined: Aug. 2006
Offline
so I got it to work but only if I dive into the copnet on the heightfield_output node.
this seems messy, and I cant understand why i can “press the button” deep inside the heightfield_output node but cant “press” the heightfield_output button on the actual node.

copnet = OutputNode.node("cop2net1")
copnet.node("./single_out").parm("execute").pressButton()
User Avatar
Member
1 posts
Joined: June 2017
Offline
Thanks a lot for posting your fix, I was pulling out my hair over this.
User Avatar
Member
82 posts
Joined: Aug. 2006
Offline
Synnoid
Thanks a lot for posting your fix, I was pulling out my hair over this.

houdini… we are all in this together lol
User Avatar
Member
9271 posts
Joined: July 2007
Online
it's just an unfortunate design of that node and a few others, it's simply explicitly setting some (hidden) parameters upon execution, whose if not promoted are locked, so it will error out
I consider this a bad practice in HDA design as a part of HDA workflow is embedding, if a node is not easily embeddable, then it's a nightmare to use it in setups and can break carefuly crafted workflows when there is a time to scale and include them as a part of more user friendly wrapper assets

you should still be able to use it fully if you promote (and maybe hide) all the parameters that node tries to set
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
82 posts
Joined: Aug. 2006
Offline
tamte
it's just an unfortunate design of that node and a few others, it's simply explicitly setting some (hidden) parameters upon execution, whose if not promoted are locked, so it will error out
I consider this a bad practice in HDA design as a part of HDA workflow is embedding, if a node is not easily embeddable, then it's a nightmare to use it in setups and can break carefuly crafted workflows when there is a time to scale and include them as a part of more user friendly wrapper assets

you should still be able to use it fully if you promote (and maybe hide) all the parameters that node tries to set

I guess the issue is that if sidefx fixes this it will “break” people who have worked around it.
id still prefer if they fixed them and just gave us a heads up.
User Avatar
Member
9271 posts
Joined: July 2007
Online
They can always bump the version so it will not affect old scenes or assets that use current version of the asset
Edited by tamte - Sept. 25, 2020 22:01:40
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links