User Tools

Site Tools


DzNodeAligner

Implements the logic of adjusting node positions to align them.

More...

Inherits :

Enumerations

Constructors

DAZ Script
DzNodeAligner ()

Methods

DAZ Script
DzErroraddNode ( DzNode node )
BooleancanAlign ()
voidclearNodes ()
BooleandoAlign ()
ArraygetNodes ()
AlignXgetXAlign ()
NumbergetXUnits ( UnitSize size=UnitsCM )
BooleangetXUseInterval ()
AlignYgetYAlign ()
NumbergetYUnits ( UnitSize size=UnitsCM )
BooleangetYUseInterval ()
AlignZgetZAlign ()
NumbergetZUnits ( UnitSize size=UnitsCM )
BooleangetZUseInterval ()
voidsetXAlign ( AlignX align )
voidsetXUnits ( Number units, UnitSize size=UnitsCM )
voidsetXUseInterval ( Boolean onOff )
voidsetYAlign ( AlignY align )
voidsetYUnits ( Number units, UnitSize size=UnitsCM )
voidsetYUseInterval ( Boolean onOff )
voidsetZAlign ( AlignZ align )
voidsetZUnits ( Number units, UnitSize size=UnitsCM )
voidsetZUseInterval ( Boolean onOff )

Signals

voidcanAlignChanged ( Boolean onOff )

Detailed Description

See Also:

Attention:

  • This object is provided by the Align pane plugin. It is only available when the Align pane plugin is activated and enabled.

Since:

  • 4.10.0.122

Enumerations


: AlignX

Enumerated values for controlling operations along the X-axis.

  • NoneX - Do not align the nodes along the X-axis.
  • AlignXLefts - Align the bounding box left edge of the nodes to the bounding box left edge of the first node, or to the grid position.
  • AlignXCenters - Align the bounding box center of the nodes to the bounding box center of the first node, or to the grid position.
  • AlignXOrigins - Align the origin of the nodes to the origin of the first node, or to the grid position.
  • AlignXRights - Align the bounding box right edge of the nodes to the bounding box right edge of the first node, or to the grid position.
  • StackXLefts - Stack node bounding boxes on the left of the first node, in the order nodes are added.
  • StackXRights - Stack node bounding boxes on the right of the first node, in the order nodes are added.
  • DistributeXLefts - Space nodes evenly according to their bounding box left edge.
  • DistributeXCenters - Space nodes evenly according to their bounding box centers.
  • DistributeXOrigins - Space nodes evenly according to their origins.
  • DistributeXRights - Space nodes evenly according to their bounding box right edge.

—–

: AlignY

Enumerated values for controlling operations along the Y-axis.

  • NoneY - Do not align the nodes along the Y-axis.
  • AlignYTops - Align the bounding box top edge of the nodes to the bounding box left edge of the first node, or to the grid position.
  • AlignYCenters - Align the bounding box center of the nodes to the bounding box center of the first node, or to the grid position.
  • AlignYOrigins - Align the origin of the nodes to the origin of the first node, or to the grid position.
  • AlignYBottoms - Align the bounding box bottom edge of the nodes to the bounding box bottom edge of the first node, or to the grid position.
  • StackYTops - Stack node bounding boxes on the top of the first node, in the order nodes are added.
  • StackYBottoms - Stack node bounding boxes on the bottom of the first node, in the order nodes are added.
  • DistributeYTops - Space nodes evenly according to their bounding box top edge.
  • DistributeYCenters - Space nodes evenly according to their bounding box centers.
  • DistributeYOrigins - Space nodes evenly according to their origins.
  • DistributeYBottoms - Space nodes evenly according to their bounding box bottom edge.

—–

: AlignZ

Enumerated values for controlling operations along the Z-axis.

  • NoneZ - Do not align the nodes along the Z-axis.
  • AlignZFronts - Align the bounding box front edge of the nodes to the bounding box front edge of the first node, or to the grid position.
  • AlignZCenters - Align the bounding box center of the nodes to the bounding box center of the first node, or to the grid position.
  • AlignZOrigins - Align the origin of the nodes to the origin of the first node, or to the grid position.
  • AlignZBacks - Align the bounding box back edge of the nodes to the bounding box right edge of the first node, or to the grid position.
  • StackZFronts - Stack node bounding boxes on the front of the first node, in the order nodes are added.
  • StackZBacks - Stack node bounding boxes on the back of the first node, in the order nodes are added.
  • DistributeZFronts - Space nodes evenly according to their bounding box front edge.
  • DistributeZCenters - Space nodes evenly according to their bounding box centers.
  • DistributeZOrigins - Space nodes evenly according to their origins.
  • DistributeZBacks - Space nodes evenly according to their bounding box back edge.

—–

: UnitSize

Enumerated values for defining the unit of measure.

  • UnitsM - 1 unit is equal to 1 meter.
  • UnitsCM - 1 unit is equal to 1 centimeter.
  • UnitsYD - 1 unit is equal to 1 yard.
  • UnitsFT - 1 unit is equal to 1 foot.
  • UnitsIN - 1 unit is equal to 1 inch.

Constructors


DzNodeAligner()

Default Constructor.

Methods


DzError : addNode( DzNode node )

Adds a node to the list of node to be processed.

Parameter(s):

  • node - The node to add to the list.

Return Value:

  • DZ_NO_ERROR (0x00000000) if node was sucessfully added to the list, DZ_ALREADY_EXISTS_ERROR (0x00000050) if node is already in the list, and DZ_ILLEGAL_ARGUMENT_ERROR (0x00000060) if node is null.

Attention:

  • The order that nodes are added to the list impacts the results of the alignment operation. The first node in the list is used as the basis for any Align, Stack or Distribute operations. The last node in the list is used to establish the range for Distribute operations. All other nodes in the list are processed in their respective order within the list.

Boolean : canAlign()

Return Value:

  • true if the current list of nodes, in conjuction with the current option configuration, can be applied, otherwise false.

Attention:

  • At least one alignment axis must be set to a value other than “None.” Aligning “To Grid” (UseInterval) requires at least one (1) node to be added. Aligning without using an interval requires at least two (2) nodes to be added. Distributing, with or without using an interval, requires at least three (3) nodes to be added. If any “UseInterval” option is active, the corresponding value must be greater than 0. No more than one (1) node within the hierarchy of a given skeleton can be added.

See Also:


void : clearNodes()

Clears the list of nodes to be processed.


Boolean : doAlign()

Performs an alignment of nodes, based on the current options set.

Return Value:

  • true if the alignment operation was successful, otherwise false.

See Also:


Array : getNodes()

Return Value:

  • The list of nodes that alignment operations will be performed on (if any), otherwise an empty list.

AlignX : getXAlign()

Return Value:

  • The align operation to perform along the X axis.

Number : getXUnits( UnitSize size=UnitsCM )

Parameter(s):

  • size - The size of units to get.

Return Value:

  • The number of units along the X axis, in the specified size.

Boolean : getXUseInterval()

Return Value:

  • true if using an interval along the X axis is enabled, otherwise false.

AlignY : getYAlign()

Return Value:

  • The align operation to perform along the Y axis.

Number : getYUnits( UnitSize size=UnitsCM )

Parameter(s):

  • size - The size of units to get.

Return Value:

  • The number of units along the Y axis, in the specified size.

Boolean : getYUseInterval()

Return Value:

  • true if using an interval along the Y axis is enabled, otherwise false.

AlignZ : getZAlign()

Return Value:

  • The align operation to perform along the Z axis.

Number : getZUnits( UnitSize size=UnitsCM )

Parameter(s):

  • size - The size of units to get.

Return Value:

  • The number of units along the Z axis, in the specified size.

Boolean : getZUseInterval()

Return Value:

  • true if using an interval along the Z axis is enabled, otherwise false.

void : setXAlign( AlignX align )

Sets the align operation to perform along the X axis.

Parameter(s):

  • align - The align operation to perform.

void : setXUnits( Number units, UnitSize size=UnitsCM )

Sets the interval to use along the X axis.

Parameter(s):

  • units - The number of units to set.
  • size - The size of the unit to set.

void : setXUseInterval( Boolean onOff )

Sets whether or not to use an interval along the X axis.

Parameter(s):

  • onOff - If true, the interval is used.

Attention:

  • Intervals can be used for Align (grid) and Stack (space) operations, but have no meaning for Distribute operations.

void : setYAlign( AlignY align )

Sets the align operation to perform along the Y axis.

Parameter(s):

  • align - The align operation to perform.

void : setYUnits( Number units, UnitSize size=UnitsCM )

Sets the interval to use along the Y axis.

Parameter(s):

  • units - The number of units to set.
  • size - The size of the unit to set.

void : setYUseInterval( Boolean onOff )

Sets whether or not to use an interval along the Y axis.

Parameter(s):

  • onOff - If true, the interval is used.

Attention:

  • Intervals can be used for Align (grid) and Stack (space) operations, but have no meaning for Distribute operations.

void : setZAlign( AlignZ align )

Sets the align operation to perform along the Z axis.

Parameter(s):

  • align - The align operation to perform.

void : setZUnits( Number units, UnitSize size=UnitsCM )

Sets the interval to use along the Z axis.

Parameter(s):

  • units - The number of units to set.
  • size - The size of the unit to set.

void : setZUseInterval( Boolean onOff )

Sets whether or not to use an interval along the Z axis.

Parameter(s):

  • onOff - If true, the interval is used.

Attention:

  • Intervals can be used for Align (grid) and Stack (space) operations, but have no meaning for Distribute operations.

Signals


void : canAlignChanged( Boolean onOff )

Signature:“canAlignChanged(bool)”

Emitted when the state of whether or not alignment is possible has changed.