DzExpression Class Reference
[Property Objects]

DAZ Studio implementation of scripted expression property links. More...

Inheritance diagram for DzExpression:

DzNumericController DzController DzBase QObject Object List of all members.

Properties

Boolean active

Methods

DzError addInput (DzExpressionInput input)
DzExpressionInput findInput (String label)
DzExpressionInput findInput (DzNumericProperty prop)
String getExpression ()
DzExpressionInput getInput (Number which)
String getInverseExpression ()
Number getNumInputs ()
void removeAllInputs ()
DzError removeInput (DzExpressionInput input)
DzError removeInput (Number which)
void setExpression (String script, String inverseScript="")

Constructors

 DzExpression ()

Signals

void propertyDeleted (DzProperty prop)
 Signature: "propertyDeleted(DzProperty*)"

Detailed Description

DAZ Studio implementation of scripted expression property links.

This numeric controller implements an expression that is evaluated at runtime which can use the current value of the property and zero or more inputs from other properties to calculate the final value of the property using a DAZ Script.


Constructor & Destructor Documentation

DzExpression::DzExpression (  ) 

Default constructor.


Member Function Documentation

DzError DzExpression::addInput ( DzExpressionInput  input  ) 

Adds the input to this expression.

Parameters:
input The new input to add to the expression.

DzExpressionInput DzExpression::findInput ( String  label  ) 

which The index of the input to return.

Returns:
The input at the given index, or NULL if the index was invalid.

DzExpressionInput DzExpression::findInput ( DzNumericProperty  prop  ) 

which The index of the input to return.

Returns:
The input at the given index, or NULL if the index was invalid.

String DzExpression::getExpression (  ) 

Returns:
The text of the script that is evaluated to apply the expression.

DzExpressionInput DzExpression::getInput ( Number  which  ) 

which The index of the input to return.

Returns:
The input at the given index, or NULL if the index was invalid.

String DzExpression::getInverseExpression (  ) 

Returns:
The text of the script that is evaluated to inverse apply the expression.

Number DzExpression::getNumInputs (  ) 

Returns:
The number of inputs for the expression.

void DzExpression::propertyDeleted ( DzProperty  prop  )  [signal]

Signature: "propertyDeleted(DzProperty*)"

Emitted when a source property or current property is deleted.

void DzExpression::removeAllInputs (  ) 

Clears the list of inputs for the expression.

DzError DzExpression::removeInput ( DzExpressionInput  input  ) 

Removes the given input from the expression.

Parameters:
input The input to remove from the expression.

DzError DzExpression::removeInput ( Number  which  ) 

Removes the input at the given index from the expression.

Parameters:
which The index of the input to remove from the expression.

void DzExpression::setExpression ( String  script,
String  inverseScript = "" 
)

Sets the DAZ Script that is evaluated to apply this expression. An inverse script should be provided if the expression is invertible. Providing an inverse expression ensures that keys on the controlled property are correctly set when the user modifies the controlled property from the interface. If the expression completely ignores the currently keyed value of the property it is controlling, an inverse function is not necessary, otherwise, if an inverse function is not provided, modifying the controlled property from the interface will have unpredictable results.

Parameters:
script The text of the DAZ Script to evaluate for this expression.
inverseScript The text of the DAZ Script to evaluate when applying this expression in inverse. If empty, the expression will do nothing when applied in inverse.


Member Data Documentation

Boolean DzExpression::active

This property determines whether or not the controller is applied.


Generated on Thu Sep 24 12:21:12 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.