Lock and unLock node settings in nuke
Lock and unLock node knobs
Nuke doesn't have inbuilt function for lock the node settings( knobs, sliders), Like fusion's node lock function. While working with bigger scripts most of the time we accidentally adjust the node sliders with out knowing which node is selected. ( what the hell is happening i didn't adjust anything..... ????!!!!! )
This code lock selected nodes knobs. So no worrier’s about accident changes.
Right click on the nodes property panel. You will get knobLock & unlock short-cut key.
menu.py:
import lockNode
nuke.menu("Properties").addCommand('lock_Knobs', 'lockNode.lockNode(True)')
nuke.menu("Properties").addCommand('unlock_Knobs', 'lockNode.lockNode(False)')
Download: locknode.py
Hope this will help you friends.
Thank you! It's important for big scripts!
ReplyDeletebut this is not working
ReplyDeleteHey pankaj its working fine. I think you have to check with your menu.py
Deletekaushal@movingframes.com
ReplyDeleteJust open ur menu.py and copy > paste below stuff....... and save :))
## Lock ur Nodes
import nuke
def lockknob(nodes,state):
for node in nodes :
allknobs=node.allKnobs()
for knob in allknobs:
knob.setEnabled(state)
nuke.toNode(node.name()).setSelected(False)
nuke.toNode(node.name()).setSelected(True)
def lockNode(state):
a=nuke.selectedNodes()
lockknob(a,not state)
toolbar = nuke.toolbar("Nodes")
myMenu = toolbar.addMenu('Lock ur Nodes', icon = 'Modify.png')
myMenu.addCommand('Lock','lockNode(True)', '+i')
myMenu.addCommand('Unlock','lockNode(False)', '#i')
Lock shortcut is Shift i
Deleteand
Unlock shortcut is Alt i
name 'lockNode' is not defined ERROR
DeleteHere its work fine pankaj. Chack your menu.py. If you cant figure out send your menu.py file via Mail.
DeleteNprofinoc_yu Zulma Chang download
ReplyDeleteinsculaber