bakeGizmos v1.4
This location is for Registered Users Only.
Perhaps you need to login or register.
8.0, 7.1, 7.0, 6.3, 6.2, 6.1, 6.0 or later
Linux, Mac, Windows
1.4 preserving node names
1.3 added optional argument to exclude gizmos in Nuke's install path. e.g.:
this will only bake inside of Group1 (and any nested Groups) but leave the top level as is:
1 |
bakeGizmos.bakeGizmos(excludeDefaults=True)
|
1.2 oops, I forgot to actually copy the knob values so the resulting group always had default values. This version fixes that.
1.1 fixed bug where node connections would be messed up if nodes were selected when the script is run.
bakeGizmos drill through a script recursively and convert all gizmos to groups, keeping the node connections in tact.
You can specify the top level at which to start.
example:
this will just bake everything starting at the root level:
1 |
bakeGizmos.bakeGizmos()
|
this will only bake inside of Group1 (and any nested Groups) but leave the top level as is:
1 |
bakeGizmos.bakeGizmos( nuke.toGroup('Group1') )
|
I will work on a panel to give more control over baking only selected nodes etc. so update to come...
Comments
If anyone's interested in a quickie terminal solution, I created an alias called "grizmo" that recursively converts in-place any gizmos found beneath the present working directory to groups, maintaining the name.
add the following line to your .bashrc (or equivalent):
alias grizmo='find . -type f -iname '\''*.gizmo'\'' -printf '\''%P\0%f\0'\' ' | xargs -0 -n2 sh -c '\''sed -i "/Gizmo {/a name ${2%.gizmo}" ${1}; sed -i "0,/Gizmo { /s/Gizmo {/Group {/" ${1}'\'' asdf'
in a shell, navigate to the directory that contains gizmos you'd like to convert, and type "grizmo".
I notice that when the script is run, gizmos get converted into groups just named "Group1", "Group2", etc. For what I'm using this script for, it would be beneficial to preserve the original node name of the gizmo, after it gets converted to a group. That is, if the "baked" group were named with the same name as the original gizmo. This way, the script with baked gizmos is still readable, in that I can see visually what the gizmos are. Just having a bunch of anonymous groups is a little confusing.
If my python skills were a little improved, it probably wouldn't be hard to implement. Just thought I would suggest it.
Thanks!
just one thing:
Is there a way to run this from the script editor without having to install it?
thanks!
If you just save the file into your ~/.nuke dir simply do "import bakeGizmos" first, then bakeGizmos.bake Gizmos() to run it
I want to thank you for making this, is absolutely amazing and helpful !
I wish my Python skills were better so I could help develop this script because it would be veeery helpful if the script would also bake the name of the gizmo into the group...
I know this 'request' has been made already, but how hard would it be to make that happen ? I understand you might not have the time but if you lead me the way I might be actually able to make it and help.
Cheers
And if there is anything I can help to improve, let me know. Although my skills are not the best at the moment, I'm eager to learn through trial and error =]
Cheers
RSS feed for comments to this post