Creating simple user interfaces
Tutorial by frank rueter
|
|
|
|
 |
 |
 |
Updated:
05/19/06
Works on:
   Nuke Versions:
4.x
Readership Level:
Intermediate
Owner:
rueter
Author Name: frank rueter
|
|
 |
 |
 |
|
 |
 |
 |
get_color
Show a color chooser dialog.
syntax:
get_color ?default?
example:
get_color "pick a colour" 15

panel
This is a bit more complex than the other methods but you can actually build simple customized interfaces that include things like file browsers, check boxes, drop down menus, etc.
syntax: panel ?-w#? ?title? {{label var type args}...}
-
?-w#?: optional - use -w followed by a number to set the desired panel width in pixels
-
?title?: optional panel title the following arguments can be repeated as many times as needed
-
label: this is the label of the following UI element
-
var: this variable contains the default value and the result afetr the panel is closed
-
args depend on the UI desired element:
-
f: a text line with folder button to enter an search filenames
-
f2: a text line with folder button to enter an search clips
-
m: multiline text input (about 4 lines)
-
m2: larger multiline input (8 lines)
-
n: notepad - huge text field. n can be followed by the number of lines required, i.e. n3
-
b: boolean check box
-
c: RGB color chip
-
e: enumeration pulldown, add tcl list of enumeration values
-
F: text font pulldown menu
-
x: expression input (needs some additinal variables)
-
(none): single line text input
example: panel "load something" { {"the file: " input f} {"check something" checked b} }

display
Creates a window showing the result of command. The command is executed in the "context" of the given node, so this and a knob name in expressions refer to that node. In the window is an "update" button which causes the command to be run again.
syntax:
display ?-width #? ?-title text? command ?context-node?
-
-w width: set the width of the window in pixels -t title: set the title of the window command: the text returned by this TCL command will be shown in the box node: if this node is changed, the dialog box will automatically update
examples:
display the IDs of all selected nodes display -width 800 -title "what
time is it?" selected_nodes
format the display
a little bit and insert line breaks display -width 800 -title "what
time is it?" {join [selected_nodes] n}
The Best thing to
do with the display command is to write an extra tcl proc that
generates and formats the output in a way you want it and then have
the display command call that proc..
Continue Tutorial: 1 2 3 4
|
|
 |
 |
 |
|
Related Learning Tools
Nuke Related DVDs
No Results. |
Nuke Related Books

The Art and Science of Digital Compositing |
Global DVDs

Shake, Expressions, Scripting and Macros |
 |
 |
 |
|
Top Rated Nuke Tutorials
Related Tips
Warning: mysql_result() [ function.mysql-result]: Unable to jump to row 0 on MySQL result index 36 in /var/www/inc/fx_functions2.php on line 759
No Results to Display
More Tutorials by rueter
|
|
 |
 |
 |
|

|
|