List of Nuke Flags

Written by camer camer on .

"""
flags.py
nuke flags for easy access from /include/DDImage/Knob.h
These are updated for nuke 6.2 with added comments. Flags not in 6.1 are
READ_ONLY, GRANULARY_UNDO, NO_RECURSIVE_PATHS
comments taken from Documentation/NDK/Plugins/namespaceDD_1_1Image.html#426fa024992892aa333e53b4e19109b5
"""

# General flags (must not intersect any class-specific flags):
# Values that work for any knob:
DISABLED            = 0x00000080    # DISABLED Set by disable(), cleared by enable().
NO_ANIMATION        = 0x00000100    # NO_ANIMATION Prevent the value from being animated. This removes any anymation or view buttons, and it stops tcl expressions from being evaluated in string knobs, and may make it ignore attempts to set expressions or key frames (nyi).
DO_NOT_WRITE        = 0x00000200    # DO_NOT_WRITE Don't ever save this knob to a script (including copy & paste!)
INVISIBLE           = 0x00000400    # INVISIBLE The knob does not appear in the panels. No widgets are created. This is not the same as hide(), and show() will not undo it!
RESIZABLE           = 0x00000800    # RESIZABLE The knob can stretch in the panel so that it fills up all the remaining space in the line. Defaults to true for most of the complex knobs, but off for buttons, checkmarks, and pulldown lists.
STARTLINE           = 0x00001000    # STARTLINE This knob starts a new row in the panel. The default is true unless a zero-length (not NULL) string is passed as the label. Currently the default is false for checkmarks and buttons but this may change in future versions.
ENDLINE             = 0x00002000    # ENDLINE This knob will end a row, acts exactly like STARTLINE was set on the next knob. Set true for divider lines.
NO_RERENDER         = 0x00004000    # NO_RERENDER This knob does not contribute to the hash value for the op. This should be used on knobs that have no effect on the op's output.
NO_HANDLES          = 0x00008000    # NO_HANDLES Don't draw anything in the viewer, this is useful if the Op draws it's own indicators.
KNOB_CHANGED_ALWAYS = 0x00010000    # KNOB_CHANGED_ALWAYS will call node()->knob_changed() every time the value of the knob changes. Normally it is only called if the user changes the value with the panel open. This allows you to track all changes to the value. Be careful as knob_changed() will be called without storing the new values into your structure.
NO_KNOB_CHANGED     = 0x00020000    # NO_KNOB_CHANGED: Don't bother calling Op::knob_changed() with this knob. This is turned on automatically if the knob_changed() returns false.
HIDDEN              = 0x00040000    # HIDDEN Set by hide(), cleared by show().
NO_UNDO             = 0x00080000    # NO_UNDO Don't undo/redo any changes to this knob. May be replaced with "output knob" in the future.
ALWAYS_SAVE         = 0x00100000    # ALWAYS_SAVE save the knob to a script even if not_default() returns false. Deprecated, instead override not_default() and make it return true!
NODE_KNOB           = 0x00200000    # NODE_KNOB is used by Nuke internally for controls on the DAG appearance such as xpos and ypos.
HANDLES_ANYWAY      = 0x00400000    # HANDLES_ANYWAY makes the handles appear in the viewer when the panel is open even if a different tab is selected.

READ_ONLY           = 0x10000000 # knob cannot be modified by UI intervention but can still be copied from etc

# internal use:
INDETERMINATE       = 0x00800000
COLOURCHIP_HAS_UNSET= 0x01000000 # < whether a color chip can be in the 'unset' state DEFAULTS TO FALSE
SMALL_UI            = 0x02000000
NO_NUMERIC_FIELDS   = 0x04000000
NO_CURVE_EDITOR     = 0x20000000
NO_MULTIVIEW        = 0x40000000
EARLY_STORE         = 0x80000000

# Numeric knobs: Values that work for knobs that store numbers:
MAGNITUDE           = 0x00000001    # MAGNITUDE If there are several numbers, this enables a button to only show a single number, and all are set equal to this number. Default is true for WH_knob() and Color_knob().
SLIDER              = 0x00000002    # SLIDER Turns on the slider. Currently this only works if the size is 1 or MAGNITUDE is enabled and it is set to single numbers. Defaults to on for most non-integer numerical controls.
LOG_SLIDER          = 0x00000004    # LOG_SLIDER Tick marks on the slider (if enabled with SLIDER) are spaced logarithmically. This is turned on for WH_knob() and Color_knob(), and if the range has both ends greater than zero. If you turn this on and the range passes through zero, the scale is actually the cube root of the number, not the logarithim.
STORE_INTEGER       = 0x00000008    # STORE_INTEGER Only integer values should be displayed or stored.
FORCE_RANGE         = 0x00000010    # FORCE_RANGE Clamps the value to the range when storing.
ANGLE               = 0x00000020    # ANGLE Turn on a little widget depicting this number as an angle.
NO_PROXYSCALE       = 0x00000040    # NO_PROXYSCALE disables proxy scaling for XY or WH knobs. Useful if you just want two numbers called "x" and "y" that are not really a position. You probably also want to do NO_HANDLES.

# String Knobs
GRANULAR_UNDO       = 0x00000001
NO_RECURSIVE_PATHS  = 0x00000002

# Enumeration: Values that work for Enumeration_knob():
SAVE_MENU           = 0x02000000    # SAVE_MENU writes the contents of the menu to the saved script. Useful if your plugin modifies the list of items.

# BeginGroup: Values that work for BeginGroup():
CLOSED              = 0x00000001    # CLOSED True for a BeginGroup knob that is closed
TOOLBAR_GROUP       = 0x00000002 # Make the group into a viewer toolbar
TOOLBAR_LEFT        = 0x00000000 # Position in the viewer. Only set one of these:
TOOLBAR_TOP         = 0x00000010
TOOLBAR_BOTTOM      = 0x00000020
TOOLBAR_RIGHT       = 0x00000030
TOOLBAR_POSITION    = 0x00000030 # A mask for the position part of the flags

# ChannelSet/Channel: Values that work for ChanneSet_knob() and Channel_knob():
NO_CHECKMARKS       = 0x00000001    # NO_CHECKMARKS Get rid of the individual channel checkmarks.
NO_ALPHA_PULLDOWN   = 0x00000002    # NO_ALPHA_PULLDOWN Get rid of the extra pulldown that lets you set the 4th channel to an arbitrary different layer than the first 3.

# Format knob: Values that work for Format_knob():
PROXY_DEFAULT       = 0x00000001    # PROXY_DEFAULT makes the default value be the root.proxy_format rather than the root.format.

Comments   

 
+12 # John Benson 2012-04-11 02:17
Dude - these are completely lifted from http://www.nukepedia.com/python/some-flags - whats up with that?
 

You have no rights to post comments

We have 3906 guests and 107 members online