Prev | Next


The tcl Scripting Environment


Main Scriptable Objects

Summary

“it” has a simple structure of images contained within catalogs, catalogs contained with the singleton application object. A good demonstration on how to retrieve and manipulate these objects for scripting purposes can be found in the Web page example in the tutorials.


Object Model Reference

it
it ClearSession
resets “it”
it SaveSession filename
saves the current “it” state to filename
it RestoreSession filename
restores the current “it” state from filename
it Shutdown
causes “it” to exit
it NewCatalog arglist
creates a new catalog
it GetCatalogList
returns a list of catalog objects
it SetCurrentCatalog cat
sets the current catalog (cat)
it GetCurrentCatalog
returns the current catalog object
it IceExpr expr
causes the IceMan expression (expr) to execute.
it SetDefaultEventHandler evt cmd
cause cmd to be executed when an event triggers. Known events include: itOpenHandler, itCloseHandler.

catalog
$cat NewImage arglist
creates a new image in the context of the named catalog.
$cat GetCurrentImage
returns the current image.
$cat GetImageList args
returns a list of images in the named catalog. args can be provided to reduce the image list. We apply standard glob-style pattern matching and currently apply two search criteria: -h pat matches the element handle, -fn pat matches the filename.
$cat DeleteImage img
Deletes the current image from the catalog.
$cat SetSequenceInfo arglist
sets the sequence control state for the named catalog.
$cat ExecuteIceManScript script
executes the IceMan script in the context of the named catalog.
$cat GetCropRegion args
Returns the current crop region associated with the current image of the named catalog. The optional argument -fmt allows you to request the format for the crop region. Valid formats include: Ri (RenderMan Format), and Ice. We default to Ri format.

image
$img GetImageList args
returns the list of subimages, often empty. As with the catalog methdod, you can use the optional args to reduce the image list.
$img GetNotes
returns the notes associated with $img
$img SetNotes str
sets the notes for $img
$img GetHandle
returns the handle used to reference the image in IceMan scripts
$img SetHandle h
sets the IceMan scripting handle, must be unique within the catalog
$img GetFilename
returns the filename string associated with $img
$img SetFilename name
sets the filename for $img.
$img GetSize
returns the image size as a Tcl list: {width height}
$img GetBox
returns the image box as a Tcl list: {xmin ymin xmax ymax}

Custom Extensions

You can extend or modify the Tcl scripting environment by loading your own .tcl files on “it” startup. In your local copy of it.ini place:

	LoadExtension tcl /my/extensionpath/MyItExtensions.tcl

 


Prev | Next


 

 

Pixar Animation Studios
Copyright© Pixar. All rights reserved.
Pixar® and RenderMan® are registered trademarks of Pixar.
All other trademarks are the properties of their respective holders.