使用python你可以干下面的事:
读取、设置节点位置的属性
控制节点图的推拉
在Nukepedia上有一个视频教程
读取、设置节点位置
通过其knob可以存取节点的x y位置
node = nuke.createNode( 'NoOp' )
print node['xpos'].value()
使用常用的knob方法设置新位置:
node['xpos'].setValue(100)
print 'new position is', node['xpos'].value()
获取位置的其他方法:
node.setXpos( 111 )
node.setYpos( 222 )
xPos = node.xpos()
yPos = node.ypos()
print 'new x position is ' , xPos
print 'new y position is', yPos
同时设置x y
node.setXYpos( 123, 234 )
在缩放1的情况下获取节点像素的宽,高
nodeWidth = node.screenWidth()
nodeHeight = node.screenHeight()
print "node dimensions are %s x %s" %( nodeWidth, nodeHeight )
自动安排节点,不重叠:
for n in nuke.allNodes():</