Jump to content
papsphilip

Python module - create/delete nodes inside locked asset

Recommended Posts

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?

 

callback_parm_kwargs_hda_node.hip

Share this post


Link to post
Share on other sites

what do you mean predefine it as editable? in the node tab there is the "Editable Nodes" field, but that concerns a specific nodes inside the hda.

i wanted a locked asset i can pass around to other creators where they would press a button and create a bunch of nodes, press another and delete them. without having access to the network inside.

Share this post


Link to post
Share on other sites

This editable option is inherited to all children. So create a subnet in the hda and do the procedural creation inside the subnet.

Edited by Drughi

Share this post


Link to post
Share on other sites
1 minute ago, Drughi said:

This editable option is inherited to all children. So create a subnet in the hda and do the procedural creation inside the subnet.

got it! thank you!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×