Preset Backdrop 1.2
Create quick preset customised Backdrops. Press ctrl+alt+b (or go to the menu 'V!ctor/Preset Backdrop'. This function pop up a panel to choose your preset (and optional custom label) and creates the Backdrop around your selected nodes.
Available presets:
Additive Key
Bloom
Camera Projection
Camera Setup
CG
CG: Ambient
CG: Diffuse
CG: Reflection
CG: Refraction
CG: Shadow
CG: Specular
Cleanup
Controllers
Color Correction
Despill
Edge Fixes
Elements
FX
Key
Matte
Lens Flare
Light Setup
Light Wrap
Output
Previous Versions
References
Relight
Resources
Rig Removal
Roto
Set Extension
Stereo Fixes
Temp
Test
Transformations
Every preset has its color and icon. You can modify the label of any Backdrop on creation or just leave it blank for the default label.
Add to menu.py
1
2
3
|
import presetBackdrop
VictorMenu = nuke.menu('Nuke').addMenu('V!ctor')
VictorMenu.addCommand('Preset Backdrop', 'presetBackdrop.presetBackdrop()', 'ctrl+alt+b')
|
Copyright (c) 2011, Victor Perez.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-Neither the name of Victor Perez may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Please login in order to download these files.
Comments
something like that
m=nuke.menu("Nuke")
m.addCommand('Scripts/Bookmarks', 'presetbackdrop .presetBackdrop ()', 'alt+ctrl+b')
I've submitted those changes
Cheers,
Victor
to warn about possible consequences from using icons in Node graph panel (although i find handy to have them)
http://pastebin.com/t2SqMzzt
Hey there! Here's the fix, replace this line and you're good to go
hexColour = int("{0:X}{1:X} {2:X}{3:X}".for mat(int(r*255), int(g*255), int(b*255),1), 16)
Cheers
Traceback (most recent call last):
File "C:/Users/user1 11/.nuke/menu.p y", line 239, in
import V_PostageStampG enerator
File "C:/Users/user111/.nuke/gizmos/V_Tools\V_PostageStampG enerator.py", line 29
print i.knob('name'). value()
^
in the menu.py ?
i use Nuke indie can this cause the problem?
hexColour = int("{0:X}{1:X} {2:X}{3:X}".for mat(int(r*255), int(g*255),int( b*255),1), 16)
I found this way actually works correctly - you get the colors defined in the script
hexColour = int("{0:02x}{1: 02x}{2:02x}{0:0 2x}{3:02x}".for mat(int(r*255), int(g*255),int( b*255),1),16)
I'm also having the issue with the "%x format: an integer is required, not float" message". I've tried all of the above but I get this message when trying to open Nuke. I'm running 13.v5
".nuke/menu.py : error interpreting this plugin"
I'm also having the issue with the "%x format: an integer is required, not float" message". I've tried all of the above but I get this message when trying to open Nuke. I'm running 13.v5
".nuke/menu.py : error interpreting this plugin"
hexColour = int("{0:02x}{1: 02x}{2:02x}{3:0 2x}".format(int (r*255), int(g*255),int( b*255),1),16)
There were some syntax and spacing issues in the examples above.
i use nukeindie. can this cause the problem?
hexColour = (255,255,255);
the int is the problem, i just delete it with hardcode.
r = presetColor[0])
g = presetColor[1]
b = presetColor[2]
hexColour = int('%02x%02x%0 2x%02x' % (r*255,g*255,b*255,1),16)
to
r = int(presetColor[0]*255)
g = int(presetColor[1]*255)
b = int(presetColor[2]*255)
hexColour = int('%02x%02x%0 2x%02x' % (r,g,b,1),16)
r = int(presetColor [0] * 255)
g = int(presetColor [1] * 255)
b = int(presetColor [2] * 255)
hexColour = int('%02x%02x%0 2x%02x' % (r, g, b, 1), 16)
Thank you Victor for a very useful tool!
r = int(presetColor [0]*255)
g = int(presetColor [1]*255)
b = int(presetColor [2]*255)
hexColour = int('%02x%02x%0 2x%02x' % (r,g,b,1),16)
RSS feed for comments to this post