randomRotoColor
randomRotoColor
Created a node with python button called "randomRotoColor". It applies random color values to the individual roto shapes on selected roto nodes in nuke. Nicolas Houle made this script for help me out. I made some manipulation on that script and make it work really handy. You can apply random overlay color value to each roto shapes.
Add this node into your node-graph. Select the roto nodes ( multiple or single ) and click the randomRotoColor button. Your roto shapes are changed their color values randomly from default white color.
Before:
After randomRotoColor applied:
I made it randomRotoColor gizmo. you can download it from below link.
else copy below code and run it from nuke's script editor:
def randomRotoColor(elem):
for i in elem:
if isinstance(i, nuke.rotopaint.Layer):
randomRotoColor(i)
elif isinstance(i, nuke.rotopaint.Shape):
attrs = i.getAttributes()
randR = nuke.expression('random()')
randG = nuke.expression('random()')
randB = nuke.expression('random()')
attrs.set('r', randR)
attrs.set('g', randG)
attrs.set('b', randB)
for i in nuke.selectedNodes():
rotoCurve = i['curves']
rotoRoot = rotoCurve.rootLayer
randomRotoColor(rotoRoot)
Below code works with "Group node": ( This code will apply random colors to all roto nodes inside the group )
Hope it will help you guys.
|
denvoKria-ge Shay Jones https://wakelet.com/@pregkeyposcart624
ReplyDeletehatwhislsandtroub