Created
January 6, 2021 01:17
-
-
Save MitchellKehn/d97840a70851bf0c14049e5484b06677 to your computer and use it in GitHub Desktop.
[random rotoshape fill color] sets the fill color of all roto shapes to be a random RGB something. viewer needs a kick in the pants sometimes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
rp = nuke.selectedNode() | |
for element in rp['curves'].rootLayer: | |
if isinstance(element, nuke.rotopaint.Stroke) or isinstance(element, nuke.rotopaint.Shape): | |
attrs = element.getAttributes() | |
attrs.set("r", random.random()) | |
attrs.set("g", random.random()) | |
attrs.set("b", random.random()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment