Esempio n. 1
0
def select_children():
    n = nuke.thisNode()
    listOfChildren = postal_main.get_child_list(n)

    nukescripts.clear_selection_recursive()

    postal_main.set_child_list(n, listOfChildren, True)
Esempio n. 2
0
def toggle_inputs(n):
    n = nuke.thisNode()
    n['hideInputTracker'].setValue(not n['hideInputTracker'].value())

    listOfChildren = postal_main.get_child_list(n)

    for child in listOfChildren:
        childNode = nuke.toNode(child)
        if not childNode is None:
            childNode['hide_input'].setValue(
                not childNode['hide_input'].value())

    postal_main.set_child_list(n, listOfChildren, False)
Esempio n. 3
0
def update_label(parent_node):
	parent_node['autolabel'].setValue("nuke.thisNode().knob('parentLabel').getValue()")
	newParentLabel = parent_node['parentLabel'].getValue()

	listOfChildren = postal_main.get_child_list(parent_node)

	for child in listOfChildren:
		childNode = nuke.toNode(child)
		if childNode is None: 
			continue
		childNode['parentLabel'].setValue(newParentLabel)
		childNode.knob('autolabel').setValue("nuke.thisNode().knob('parentLabel').getValue()")

	postal_main.set_child_list(parent_node, listOfChildren, False)
Esempio n. 4
0
def connect_to_parent(thisNode):
    print 'connecting to parent!'
    parentName = thisNode['parentID'].value()
    parentNode = nuke.toNode(parentName)
    thisNode.setInput(0, parentNode)
    thisNode['hide_input'].setValue(parentNode['hideInputTracker'].value())
    thisNode['parentLabel'].setValue(parentNode['parentLabel'].value())

    listOfChildren = postal_main.get_child_list(parentNode)

    childName = thisNode['name'].value()
    if childName not in listOfChildren:
        listOfChildren.append(childName)

    postal_main.set_child_list(parentNode, listOfChildren, False)
Esempio n. 5
0
def connect_to_parent(thisNode):
	parentName = thisNode['parentID'].value()

	parentNode = nuke.toNode(parentName)
	if parentNode is None:
		nuke.message('ERROR: unable to locate parent. Has the parent been deleted?')
		return

	thisNode.setInput(0, parentNode)
	thisNode['hide_input'].setValue(parentNode['hideInputTracker'].value())
	thisNode['parentLabel'].setValue(parentNode['parentLabel'].value())


	listOfChildren = postal_main.get_child_list(parentNode)


	childName = thisNode['name'].value()
	if childName not in listOfChildren:
		listOfChildren.append(childName)

	postal_main.set_child_list(parentNode, listOfChildren, False)