Phase

< Previous | Contents | Manuals Home | Boris FX | Next >

Phase

These are solver phases, as created from the phase panel and view. The interface here allows phases to be examined or configured. The results of a solve of a particular phase are not available, nor is it possible to create fundamentally new kinds of phases from Sizzle at the current time. To add a new phase to the scene, see Scene.NewPhase. Don't forget to assign a new position and size to it.

In addition to the attributes listed here (including user-defined attributes), phases also permit access to their phase-kind-dependent user interfaces, ie as shown on the Phase control panel. Use NParam() and ParamName() to determine those names for any given parameter kind. Any parameter that specified an object of any kind (camera, moving object, mesh, tracker, etc) must be written or read back as a uniqueID string, not as the corresponding Sizzle object.

Phases also have their own set of "selected" parameter trackers. This set of parameter trackers is used by some phases, for example, Autoplace uses it (optionally) to determine what trackers to base the placement on. This set of trackers is different than the selected trackers in the main user interface, and from the set of selected trackers flowing through the phase pipeline during solving, though some phases flip back and forth between these.

.Clone() Clone of this phase, with a new unique name. It will be connected to the same inputs as the original.

.color The color of the phase (rim) on the phase view canvas.

.DeleteInput(inpno) Delete the given input. Note that this does not

set the input to null, it removes it altogether. For phases with varying numbers of inputs

only. Do not delete inputs of phases with a fixed number of inputs or you will cause a crash. To make an existing input connect to nothing, do not delete it, do a SetInput(inpno, 0).

.hasBeenRun Returns 1 if the phase has been run and the results are still valid. Returns 0 if not. Can be written to 0 only!

.Input(num) Returns the num'th input phase to this phase.

.isRoot Returns 1 if this is the root phase. Writeable, writing to 1 makes this the root phase, writing to 0 clears the root phase only if this is the root phase.

.isSel Returns 1 if the phase is selected in the phase view. Writing 1 makes this the only selected phase, writing 2 makes this phase selected without unselecting any other.

Writing 0 unselects this phase.

.isSelected Returns 1 if the phase is selected in the phase view. Writing either selects or unselects the phase, other phases are never affected.

.kind Phase's kind, a small integer

.kindName The text string name of the kind of the phase.

This name may be changed by the phase depending on the parameter settings for this particular phase. See rawKindName.

.mainObj The main camera/moving object parameter to the phase (may or may not be used by any specific phase).

.NInput() Number of input connections to the phase

.NParam() Number of input parameters to the phase

.nm The name of the phase (R/W)

.note A user-created note about the function/intent/etc of this phase.

.ParamName(paramno) The internal parameter name of the specified

parameter. This call should be used during development to determine the appropriate parameter names of this kind of phase. You can then read or write directly all phases of this same type.

.ParamSign(parmno) Sign that is applied to the parameter for the

current axis-up mode, either +1 or -1. Zero if an invalid parameter number.

.position A point, the 2-D location of the phase on the phase view canvas. Call it in "inches"

.rawKindName A fixed kind name for the phase, the same that appears on the phase view right-click menu, for use with Scene.NewPhase.

.scriptDefined (This entry is only a place-holder, there is no attribute with this name.) You can add new attributes to this type, see Script-Defined Attributes.

.SetInput(inpno, phase) Sets an input (1..NInput()+1) to the specified

phase object. The second argument can be zero to make it connect to nothing. You can add inputs by setting the next input past the current last one, if that kind of phase permits a varying number of connections.

.size A point, the 2D size of the phase on the phase view canvas.

.TkClearSelection() Clears the phase's tracker parameter selection set: no trackers are selected.

.TkIsSelected(tk) Returns 1/0 depending on whether this tracker is selected in this phase's tracker parameter selection set.

.TkNSelected() Returns the number of trackers in this phase's tracker parameter selection set.

.TkNthSelected(n) Returns the n'th selected tracker in this phase's tracker parameter selection set.

.TkSetSelected(tk, sel) Selects or unselects the tracker in this

phase's tracker parameter selection set.


.uniqueID A unique ID string (representing a 64-bit integer)

.willDelete 1 if the phase will be deleted after the script completes. Can be changed to control what will happen.

©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.