User Tools

Site Tools


DzFloatProperty

An animatable floating-point property.

More...

Inherits :

Inherited By : DzFloat2Property, DzFloat3Property and DzNumericNodeProperty

Enumerations

Constructors

DAZ Script
DzFloatProperty ()
DzFloatProperty ( String name, Boolean canAnimate, Boolean isUserProperty, Number defaultVal=0.0 )

Methods

DAZ Script
voidadd ( Number val, Boolean applyToDefault=true )
NumberadjustValue ( Number val )
NumberadjustValue ( DzTime tm, Number val )
voiddivide ( Number val, Boolean applyToDefault=true )
NumbergetDefaultValue ()
BooleangetDisplayAsPercent ()
NumbergetDoubleDefaultValue ()
NumbergetDoubleValue ( DzTime tm )
InterpolationTypegetKeyInterpolationType ( Number i )
ArraygetKeyInterpolationTypeValues ( Number i )
NumbergetKeyValue ( Number i )
NumbergetLocalValue ()
NumbergetLocalValue ( DzTime tm )
NumbergetMax ()
NumbergetMin ()
NumbergetRawValue ()
NumbergetRawValue ( DzTime tm )
NumbergetScaledFollowValue ( DzTime tm )
NumbergetSensitivity ()
TransformTypegetTransformType ()
NumbergetValue ()
NumbergetValue ( DzTime tm )
voidmultiply ( Number val, Boolean applyToDefault=true )
voidsetDefaultValue ( Number val )
voidsetDisplayAsPercent ( Boolean onOff )
voidsetDoubleDefaultValue ( Number val )
voidsetDoubleValue ( DzTime tm, Number val )
voidsetKeyInterpolation ( Number i, InterpolationType interp )
voidsetKeyInterpolation ( Number i, InterpolationType interp, Number param0, Number param1, Number param2 )
voidsetKeyValue ( Number i, Number val )
voidsetMax ( Number max )
voidsetMin ( Number min )
voidsetMinMax ( Number min, Number max )
voidsetSensitivity ( Number sens )
voidsetTransformType ( TransformType type )
voidsetValue ( DzTime tm, Number val, InterpolationType interp, Number param0, Number param1, Number param2 )
voidsetValue ( DzTime tm, Number val )
voidsetValue ( DzTime tm, Number val, InterpolationType interp )
voidsetValue ( Number val )
voidsubtract ( Number val, Boolean applyToDefault=true )

Signals

Detailed Description

TODO: Add detailed description.

Enumerations


: InterpolationType

TODO: Add description.

  • LINEAR_INTERP - Linear interpolation between key values.
  • CONSTANT_INTERP - Constant interpolation between key values.
  • TCB_INTERP - TCB (Kochanek-Bartels) Spline interpolation between key values.
  • HERMITE_INTERP - Hermite Spline interpolation between key values.

—–

: TransformType

TODO: Add description.

  • NON_TRANSFORM - This property is not a transform property.
  • SCALE - This property is a scale transform.
  • TRANSLATE - This property is a translation transform property.
  • ROT_FIRST_AXIS - This property is a rotation on the first axis of the rotation order.
  • ROT_SECOND_AXIS - This property is a rotation on the second axis of the rotation order.
  • ROT_THIRD_AXIS - This property is a rotation on the third axis of the rotation order.

Constructors


DzFloatProperty()

Default Constructor. Creates a non-animatable, non-user property.


DzFloatProperty( String name, Boolean canAnimate, Boolean isUserProperty, Number defaultVal=0.0 )

Parameter(s):

  • name - The name of this property.
  • canAnimate - If true, creates an animatable property.
  • isUserProperty - If true, creates a user property; user properties are properties that can be added/deleted by users.
  • defaultVal - Sets the default value of this property.

Methods


void : add( Number val, Boolean applyToDefault=true )

Adds the given value to all the key values.

Parameter(s):

  • val - The addend for the values.
  • applyToDefault - If true, val will also be added to the default value for the property.

Number : adjustValue( Number val )

Adjust the value of the property based on the contribution of property controllers.

Parameter(s):

  • val - The 'final' value desired for the property.

Return Value:

  • A 'raw' value for the property that will result in the property having the given value with the current controllers.

Number : adjustValue( DzTime tm, Number val )

Adjust the value of the property at the given time based on the contribution of property controllers.

Parameter(s):

  • tm - The scene time at which to adjust the value.
  • val - The 'final' value desired for the property.

Return Value:

  • A 'raw' value for the property that will result in the property having the given value with the current controllers.

void : divide( Number val, Boolean applyToDefault=true )

Divides all key values by the given amount.

Parameter(s):

  • val - The divisor for the values.
  • applyToDefault - If true, the default value for the property will also be divided.

Number : getDefaultValue()

Return Value:

  • The default value of the property.

Boolean : getDisplayAsPercent()

Return Value:

  • true if this property should be displayed as a percentage, false if this property should be displayed as a decimal.

Number : getDoubleDefaultValue()

Return Value:

  • The default value of this property as a double precision value.

Number : getDoubleValue( DzTime tm )

Parameter(s):

  • tm - The scene time to get the value for.

Return Value:

  • The value of this property as a double at the given time.

InterpolationType : getKeyInterpolationType( Number i )

Parameter(s):

  • i - The index of the key to get the interpolation values for.
  • param0 - If not NULL, its value will be set to value of interpolation param 0.
  • param1 - If not NULL, its value will be set to value of interpolation param 1.
  • param2 - If not NULL, its value will be set to value of interpolation param 2.

Return Value:

  • The type of interpolation performed for the i'th key in the property.

Array : getKeyInterpolationTypeValues( Number i )

Parameter(s):

  • i - The index of the key to get the interpolation type values for.

Return Value:

  • The interpolation type values for this property.

Number : getKeyValue( Number i )

Parameter(s):

  • index - The index of the key to get the value for.

Return Value:

  • The value of the i'th key in the property.

Number : getLocalValue()

This function is provided for the special case of ERC link redirection; sometimes called 'cross-talk'. For example, if Figure A (a piece of clothing, for example) is 'Fit To' Figure B, the ERC links on Figure A are redirected to follow channels on Figure B; this is how morphs on an item of clothing will follow morphs on the figure, etc. This function will provide the value of the property ignoring any redirection of ERC links. So, for a figure that is not 'Fit To' another figure, this will return the same value as getValue(). For a figure that is 'Fit To' another figure, this will return the value that the property would have if the ERC link had not been redirected.

Return Value:

  • The value of the property at the current time without any ERC link redirection.

Number : getLocalValue( DzTime tm )

This function is provided for the special case of ERC link redirection; sometimes called 'cross-talk'. For example, if Figure A (a piece of clothing, for example) is 'Fit To' Figure B, the ERC links on Figure A are redirected to follow channels on Figure B; this is how morphs on an item of clothing will follow morphs on the figure, etc. This function will provide the value of the property ignoring any redirection of ERC links. So, for a figure that is not 'Fit To' another figure, this will return the same value as getValue(). For a figure that is 'Fit To' another figure, this will return the value that the property would have if the ERC link had not been redirected.

Parameter(s):

  • tm - The scene time to get the local value for.

Return Value:

  • The value of the property at the given time without any ERC link redirection.

Number : getMax()

Return Value:

  • The maximum allowable value of the property.

Number : getMin()

Return Value:

  • The minimum allowable value of the property.

Number : getRawValue()

This function is provided to make it easy to get the 'keyed' value of the property without any modifications. When the value of a property is evaluated, first the value based on key interpolation is calculated, that value is then passed to each of the controllers on the property (ERC links for example) which can modify that value. This modified value is then returned as the value of the property by getValue(). This function returns the value of the property before the application of the controllers; strictly the result of key interpolation.

Return Value:

  • The 'raw' value of the property at the current time; this is the actual value of the property without the contribution of property links, etc.

Number : getRawValue( DzTime tm )

This function is provided to make it easy to get the 'keyed' value of the property without any modifications. When the value of a property is evaluated, first the value based on key interpolation is calculated, that value is then passed to each of the controllers on the property (ERC links for example) which can modify that value. This modified value is then returned as the value of the property by getValue(). This function returns the value of the property before the application of the controllers; strictly the result of key interpolation.

Parameter(s):

  • tm - The scene time to get the raw value for.

Return Value:

  • The 'raw' value of the property at the given time; this is the actual value of the property without the contribution of property links, etc.

Number : getScaledFollowValue( DzTime tm )

TODO: Add description.


Number : getSensitivity()

Return Value:

  • The sensitivity value for this property.

TransformType : getTransformType()

Return Value:

  • The transform type for this property.

Number : getValue()

Return Value:

  • The value of the property at the current time.

Number : getValue( DzTime tm )

Parameter(s):

  • tm - The scene time to get the value for.

Return Value:

  • The value of the property at the given time.

void : multiply( Number val, Boolean applyToDefault=true )

Multiplies all key values by the given amount.

Parameter(s):

  • val - The multiplier for the values.
  • applyToDefault - If true, the default value for the property will also be multiplied.

void : setDefaultValue( Number val )

Sets the default value for this property.

Parameter(s):

  • val - The value to set as the default for this property.

void : setDisplayAsPercent( Boolean onOff )

Sets whether this property should have its value displayed as a percentage; the default is false (value is displayed as a decimal).


void : setDoubleDefaultValue( Number val )

Sets the default value for this property.

Parameter(s):

  • val - The value to set as the default for this property.

void : setDoubleValue( DzTime tm, Number val )

Sets the value for this property at the given time; or the default value if this property is not animatable.

Parameter(s):

  • tm - The scene time to set the value for.
  • val - The value to set for this property.

void : setKeyInterpolation( Number i, InterpolationType interp )

Sets the interpolation method for the i'th key.

Parameter(s):

  • i - The index of the key to change.
  • interp - The type of interpolation to perform between this keyframe and the next.

Attention:

  • You are responsible to ensure the key index is within the valid range.

void : setKeyInterpolation( Number i, InterpolationType interp, Number param0, Number param1, Number param2 )

Sets the interpolation method for the i'th key.

Parameter(s):

  • i - The index of the key to change.
  • interp - The type of interpolation to perform between this keyframe and the next.
  • param0 - The parameter 0 for key interpolation: T value for TCB interpolation, starting slope value for Hermite interpolation.
  • param1 - The parameter 1 for key interpolation: C value for TCB interpolation, ending slope value for Hermite interpolation.
  • param2 - The parameter 2 for key interpolation: B value for TCB interpolation.

Attention:

  • You are responsible to ensure the key index is within the valid range.

void : setKeyValue( Number i, Number val )

Sets the value of the i'th key.

Parameter(s):

  • keyIndex - The index of the key to set the value for.
  • val - The value to set.

Attention:

  • You are responsible to ensure the key index is within the valid range.

void : setMax( Number max )

Set the maximum allowable value.

Parameter(s):

  • max - The maximum value to set.

void : setMin( Number min )

Set the mininimum allowable value.

Parameter(s):

  • min - The minimum value to set.

void : setMinMax( Number min, Number max )

Set the mininimum and maximum allowable values.

Parameter(s):

  • min - The minimum value to set.
  • max - The maximum value to set.

void : setSensitivity( Number sens )

Set the sensitivity for this property. This value describes the amount of change in the value of this property caused by adjustment in the interface, especially if limits are off.

Parameter(s):

  • sens - The value to set.

void : setTransformType( TransformType type )

Sets the transform type for this property.

Parameter(s):

  • type - The enumeration value for the type of transform.

void : setValue( DzTime tm, Number val, InterpolationType interp, Number param0, Number param1, Number param2 )

Sets the value for this property at the given time; or the default value if this property is not animatable.

Parameter(s):

  • tm - The scene time to set the value at.
  • val - The value to set the property to.
  • interp - The type of interpolation to perform between this keyframe and the next.
  • param0 - The parameter 0 for key interpolation: T value for TCB interpolation, starting slope value for Hermite interpolation.
  • param1 - The parameter 1 for key interpolation: C value for TCB interpolation, ending slope value for Hermite interpolation.
  • param2 - The parameter 2 for key interpolation: B value for TCB interpolation

void : setValue( DzTime tm, Number val )

Sets the value for this property at the given time; or the default value if this property is not animatable. This function differs from setRawValue() in that it takes into account any controllers on the property such that calling setValue( getValue() ) should not change the value of the property.

Parameter(s):

  • tm - The scene time to set the value at.
  • val - The value to set.

void : setValue( DzTime tm, Number val, InterpolationType interp )

Sets the value for this property at the given time; or the default value if this property is not animatable. This function differs from setRawValue() in that it takes into account any controllers on the property such that calling setValue( getValue() ) should not change the value of the property.

Parameter(s):

  • tm - The scene time to set the value at.
  • val - The value to set.
  • interp - The type of interpolation to perform between this keyframe and the next. Parameters for interpolation are set to defaults.

void : setValue( Number val )

Sets the value for this property at the current time; or the default value if this property is not animatable. This function differs from setRawValue() in that it takes into account any controllers on the property such that calling setValue( getValue() ) should not change the value of the property.

Parameter(s):

  • val - The value to set.

void : subtract( Number val, Boolean applyToDefault=true )

Subtracts the given value to all the key values.

Parameter(s):

  • val - The value to be subtracted from the key values.
  • applyToDefault - If true, val will also be subtracted from the default value for the property.

Signals


void : displayAsPercentChanged()

Signature:“displayAsPercentChanged()”

Emitted if the way this property is displayed changed.