f
f
Apple Store
Global SectionArticlesBookstoreDictionaryDownloadsDVDsEventsForumsGalleryJob ListingsNewsNewslettersSchools
 Advanced Search
USER: PASS:  Login  Register

Subscribe
Site Links
Home > Nuke > Tutorials > tcl scripting > Creating simple user interfaces > Page 4 Change background colorChange background colorChange background colorChange background color
Creating simple user interfaces
Tutorial by frank rueter
Login to add a Bookmark 0 votes for an average rating of 0.00

Updated:   05/19/06

Works on:    Windows  Linux  MacOS-X
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}

click for larger version

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:  previous page 1 2 3 4 

Login to add a Bookmark 0 votes for an average rating of 0.00

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

1. proc to toggle viewers inputs on and off by frank rueter (05/19/06)
2. Nuke and Tcl - intro by frank rueter (05/17/06)
3. Nuke and Tcl - basics I by frank rueter (05/18/06)
4. Nuke and Tcl - basics II by frank rueter (05/22/06)
5. Iteration thru a script by throb (05/19/06)


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

1. proc to toggle viewers inputs on and off by frank rueter (05/19/06)
2. Nuke and Tcl - basics I by frank rueter (05/18/06)
3. reset curve operations by frank rueter (09/06/06)
4. Creating simple user interfaces by frank rueter (05/19/06)
5. Nuke and Tcl - basics II by frank rueter (05/22/06)






Sponsors

Sponsor

Contact Us | Post Jobs | Post News | Post Events