[Python] Failed to modify node or parameter because of a permission error

   8649   7   1
User Avatar
Member
899 posts
Joined: Feb. 2016
Offline
In the PythonModule of my digital asset I have this function:
def setChildParm(node):
   node.parm("/pathToNodeInsideOtl/parm").set(value)
The function, which is called by a button on the OTL, is trying to set the value of a parameter belonging to a node inside the same digital asset.
I get the following error whenever I try to run the function:
PermissionError: Failed to modify node or parameter because of a permission error. Possible causes include locked assets, takes, product permissions or user specified permissions

That's because the digital asset is locked, so I have to allow the editing of content of the OTL in order to make it work.
But this is not what I want to do.

What's the proper workflow with python to set a parameter of a node inside the digital asset?
Any help very appreciated,
cheers
Edited by Andr - Feb. 1, 2019 16:17:06
User Avatar
Staff
3464 posts
Joined: July 2005
Offline
you can make the node inside Editable, or you can promote that parameter to the top level and make it invisible.
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
899 posts
Joined: Feb. 2016
Offline
hey Micheal, thanks for the tip!
The node inside is a simple null, so it's already “unlocked”..
I'll try the second option you mentioned.

Cheers!
User Avatar
Member
44 posts
Joined: July 2017
Offline
goldfarb
you can make the node inside Editable, or you can promote that parameter to the top level and make it invisible.
Hello!

How do you make the node inside Editable?

Thanks
User Avatar
Member
34 posts
Joined: Nov. 2016
Offline
fdevic
goldfarb
you can make the node inside Editable, or you can promote that parameter to the top level and make it invisible.
Hello!

How do you make the node inside Editable?

Thanks

In the OTL type properties tab for that HDA there is a section under the Node tab to add editable nodes
User Avatar
Member
385 posts
Joined: July 2018
Offline
how can i delete/create nodes in a locked hda from the python module?

i am using a button with a callback script that runs a delete() function

for n in node.children(): n.destroy(True)


i get an error message that i don't have permissions because the asset is locked. Is there a way around this?
User Avatar
Member
8046 posts
Joined: Sept. 2011
Online
papsphilip
how can i delete/create nodes in a locked hda from the python module?

i am using a button with a callback script that runs a delete() function

for n in node.children(): n.destroy(True)


i get an error message that i don't have permissions because the asset is locked. Is there a way around this?

A locked HDA can't change its contents. However, an HDA can contain an editable subnet which can be manipulated.
User Avatar
Member
385 posts
Joined: July 2018
Offline
jsmack
papsphilip
how can i delete/create nodes in a locked hda from the python module?

i am using a button with a callback script that runs a delete() function

for n in node.children(): n.destroy(True)


i get an error message that i don't have permissions because the asset is locked. Is there a way around this?

A locked HDA can't change its contents. However, an HDA can contain an editable subnet which can be manipulated.

Yes thank you! i got the same answer here

https://forums.odforce.net/topic/49591-python-module-createdelete-nodes-inside-locked-asset/ [forums.odforce.net]

its working

Attachments:
callback_parm_kwargs_hda_node.hip (89.4 KB)

  • Quick Links