Go to:
Attributes.
DAG object node. Base class for all objects in the
3D transformation hierarchy or DAG.
Transformation Hierarchy (DAG)
The transformation hierarchy or DAG (Directed Acyclic Graph) is a
hierarchy where objects are defined relative to the transformations
on their parent objects. These objects are dependency nodes and are
referred to as dag nodes. There are basically two types of dag
nodes: transforms and shapes. Transform nodes are grouping nodes
which can have any number of other dag nodes below it. Transform
nodes have affine transformation information which is applied to
nodes below them. Shape nodes are leaf level nodes and cannot have
any other nodes below them. Shape nodes must have at least one
transform node as a parent. Dag nodes can have more than one
parent. That is, they can be in more than one hierarchy. This makes
the transformation hierarchy a graph instead of a tree. Dag nodes
that are in more than one hierarchy are said to be "instanced".
Names
Dag nodes have names. There can be more than one dag node in the dag with
the same name. However, a transform grouping node cannot have two child
nodes with the same name.
Paths
Since there may be multiple ways to reach an instanced dag node
when traversing down from the root of the hierarchy, all dag nodes
are identified by a "path" which uniquely identifies a particular
instance of an object. Paths define the traversal path from the
root of the hierarchy down to the node. A dag node may have
multiple paths to it. Paths have an associated number which
corresponds to their position in the list of paths to the node at
the end of the path. DAG Traversal is depth first so the first
time a node is visited, the path traversed is path 0. The
second time the dag node is visited, this different path traversed
is path 1, and so on. Each path to a dag node also
defines how the node is to be transformed. Instanced dag nodes
will appear multiple times in the scene (once for each unique path
from the root of the hierarchy to the object).
Transformations
All transformations in the DAG are affine transformations. All dag node
transformations can be represented by a 4x4
transformation matrix where the fourth column contains the vector (0,0,0,1),
the fourth row contains the vector (tx, ty, tz, 1) and represents a
translational component.
This implies objects are transformed by post multiplying their position by
the transformation matrix.
Transformation Spaces
When dealing with dag nodes there is the concept of "transformation space".
Common transformation spaces include "world-space", "object-space" and
"parent-space". "world-space" is the space in which the objects appear
in the scene, after all the hierarchical transformations
have been applied. "object-space" is defined
as the space in which the geometry of the object is defined before
any transformations have been applied. Finally, "parent-space"
is the transformation space that includes the matrices of the parents
above the object but not the object's transformation matrix.
These transformation spaces are essential when dealing with attributes
from different nodes to ensure consistent behaviour. For example, to
compare
the positions of vertices on two different objects in the scene, the
vertices must first be transformed to a common transformation space.
One way this can be accomplished is to transform the vertices using
the worldMatrix attribute before doing the comparison.
Note: certain attributes like the transformation channels defined in
a transform
node do not correspond to any of the transformation spaces described
above because they are used to construct the transformation matrix.
Therefore, the order in which they are applied within the transformation
matrix defines a unique transformation space for each of these attributes.
Instanced Attributes
Additionally, dag nodes can contain a special type of attribute
called an "instanced attribute". Instanced attributes are array attributes
where the array attribute at index 'i' corresponds to instance number 'i'
for this object in the transformation hierarchy. Instances are mapped
to array
indices according to their relative ordering when traversing the DAG
depth first. (in ascending child order) When specifying
instanced attributes it is not necessary to give the array index because
the system will infer this information from the path. Therefore, the
attribute "ball.worldMatrix" corresponds to the array attribute
"ball.worldMatrix[0]". From this definition it follows that all
instanced attributes must contain at least one array item.
Matrix Attributes and MEL
Some attributes represent transformation matrixes. Although these attributes
are represented internally as 4x4 matrices, unfortunately, matrix attributes are not
returned as MEL 4x4 matrix types. Instead, they are returned as an array of floats
where the elements of the matrix are listed in row major order.
For instance, "matrix $m[4][4] = `getAttr ball.worldMatrix`;"
will not work. To obtain the value of a matrix attribute, you need something like
"float $m[16] = `getAttr ball.worldMatrix`;".
This node is abstract
Node name | Parents | MFn type | Compatible function sets |
---|
dagNode | entity | kDagNode | kBase kNamedObject kDependencyNode kDagNode |
Attributes (86)
The following quick index only shows top-level attributes (too many attributes to show them all): boundingBox (12), center (3), drawOverride (14), ghostColorPost (3), ghostColorPostA, ghostColorPre (3), ghostColorPreA, ghostCustomSteps (3), ghostDriver, ghostFrames, ghostRangeEnd, ghostRangeStart, ghosting, ghostingControl, instObjGroups (4), intermediateObject, inverseMatrix, lodVisibility, matrix, objectColor, objectColorRGB (3), parentInverseMatrix, parentMatrix, renderInfo (3), renderLayerInfo (3), selectionChildHighlighting, template, useObjectColor, visibility, wireColorRGB (3), worldInverseMatrix, worldMatrix
Long name (short name) | Type | Default | Flags |
---|
|
boundingBox
(bb )
| compound | n/a | |
|
| boundingBoxMin
(bbmn )
| double3 | | | |
| boundingBoxMinX
(bbnx )
| distance (double) | 0.0cm | | |
| | boundingBoxMinY
(bbny )
| distance (double) | 0.0cm | | |
| | boundingBoxMinZ
(bbnz )
| distance (double) | 0.0cm | | |
|
|
| boundingBoxMax
(bbmx )
| double3 | | | |
| boundingBoxMaxX
(bbxx )
| distance (double) | 0.0cm | | |
| | boundingBoxMaxY
(bbxy )
| distance (double) | 0.0cm | | |
| | boundingBoxMaxZ
(bbxz )
| distance (double) | 0.0cm | | |
|
|
| boundingBoxSize
(bbsi )
| double3 | | | |
| boundingBoxSizeX
(bbsx )
| distance (double) | 0.0cm | | |
| | boundingBoxSizeY
(bbsy )
| distance (double) | 0.0cm | | |
| | boundingBoxSizeZ
(bbsz )
| distance (double) | 0.0cm | | |
|
|
|
center
(c )
| double3 | | |
|
| boundingBoxCenterX
(bcx )
| distance (double) | 0.0cm | | |
|
| boundingBoxCenterY
(bcy )
| distance (double) | 0.0cm | | |
|
| boundingBoxCenterZ
(bcz )
| distance (double) | 0.0cm | | |
|
|
drawOverride
(do )
| compound | n/a | |
|
| overrideDisplayType
(ovdt )
| enum | 0 | | |
|
| overrideLevelOfDetail
(ovlod )
| enum | 0 | | |
|
| overrideShading
(ovs )
| bool | true | | |
|
| overrideTexturing
(ovt )
| bool | true | | |
|
| overridePlayback
(ovp )
| bool | true | | |
|
| overrideEnabled
(ove )
| bool | false | | |
|
| overrideVisibility
(ovv )
| bool | true | | |
|
| hideOnPlayback
(hpb )
| bool | false | | |
|
| overrideRGBColors
(ovrgbf )
| bool | false | | |
|
| overrideColor
(ovc )
| unsigned char | 0 | | |
|
| overrideColorRGB
(ovrgb )
| float3 | | | |
| overrideColorR
(ovcr )
| float | 0.0 | | |
| | overrideColorG
(ovcg )
| float | 0.0 | | |
| | overrideColorB
(ovcb )
| float | 0.0 | | |
|
|
|
ghosting
(gh )
| bool | false | |
|
|
ghostColorPostA
(gla )
| float | 1.0 | |
|
|
ghostColorPreA
(gap )
| float | 1.0 | |
|
|
ghostColorPost
(gac )
| float3 | 0.878, 0.678, 0.663 | |
|
| ghostColorPostR
(gar )
| float | 0.0 | | |
|
| ghostColorPostG
(gag )
| float | 0.0 | | |
|
| ghostColorPostB
(gab )
| float | 0.0 | | |
|
|
ghostColorPre
(gcp )
| float3 | 0.447, 1.0, 1.0 | |
|
| ghostColorPreR
(grr )
| float | 0.0 | | |
|
| ghostColorPreG
(gpg )
| float | 0.0 | | |
|
| ghostColorPreB
(gpb )
| float | 0.0 | | |
|
|
ghostingControl
(gc )
| enum | 0 | |
|
|
ghostCustomSteps
(gcs )
| compound | n/a | |
|
| ghostPreSteps
(gpr )
| integer | 3 | | |
|
| ghostPostSteps
(gps )
| integer | 3 | | |
|
| ghostStepSize
(gss )
| integer | 1 | | |
|
|
ghostDriver
(gdr )
| Message | n/a | |
|
|
ghostFrames
(gf )
| intArray | empty | |
|
|
ghostRangeEnd
(gre )
| time | 100.0film | |
|
|
ghostRangeStart
(grs )
| time | 0film | |
|
|
instObjGroups
(iog )
| compound | n/a | |
|
| objectGroups
(og )
| compound | n/a | | |
| objectGrpCompList
(gcl )
| componentList | NULL | | |
| | objectGroupId
(gid )
| integer | 0 | | |
| | objectGrpColor
(gco )
| short | -1 | | |
|
|
|
intermediateObject
(io )
| bool | false | |
|
|
template
(tmp )
| bool | false | |
|
|
lodVisibility
(lodv )
| bool | true | |
|
|
matrix
(m )
| matrix | identity | |
|
|
inverseMatrix
(im )
| matrix | identity | |
|
|
objectColor
(oc )
| short | 0 | |
|
|
objectColorRGB
(obcc )
| float3 | | |
|
| objectColorR
(obcr )
| float | 0.0 | | |
|
| objectColorG
(obcg )
| float | 0.0 | | |
|
| objectColorB
(obcb )
| float | 0.0 | | |
|
|
parentMatrix
(pm )
| matrix | identity | |
|
|
parentInverseMatrix
(pim )
| matrix | identity | |
|
|
renderInfo
(ri )
| compound | n/a | |
|
| identification
(rlid )
| short | 0 | | |
|
| layerRenderable
(rndr )
| bool | true | | |
|
| layerOverrideColor
(lovc )
| unsigned char | 0 | | |
|
|
renderLayerInfo
(rlio )
| compound | n/a | |
|
| renderLayerId
(rli )
| short | 0 | | |
|
| renderLayerRenderable
(rlr )
| bool | true | | |
|
| renderLayerColor
(rlc )
| unsigned char | 0 | | |
|
|
selectionChildHighlighting
(sech )
| bool | true | |
|
|
useObjectColor
(uoc )
| enum | 0 | |
|
|
visibility
(v )
| bool | true | |
|
|
wireColorRGB
(wfcc )
| float3 | | |
|
| wireColorR
(wfcr )
| float | 0.0 | | |
|
| wireColorG
(wfcg )
| float | 0.0 | | |
|
| wireColorB
(wfcb )
| float | 0.0 | | |
|
|
worldMatrix
(wm )
| matrix | identity | |
|
|
worldInverseMatrix
(wim )
| matrix | identity | |
|