Edit Stage Metrics#
Key: editStageMetrics
This operation changes the metersPerUnit and/or upAxis of a stage’s active edit target layer by updating the layer’s metadata and applying relevant transformations to attributes that represent world space units so that they reflect the new metersPerUnit/upAxis.The operation is designed to only modify attributes that represent a world space value in the stage’s active edit layer. This means prims/attributes that exist in the scene from external references or sublayers will not be affected by the operation.
- An overview of some specifics about how the operation will affect attributes or xformOps in the stage:
When changing the
metersPerUnitof prims that are a defined schema that have inferred attributes values that don’t need to be defined. For example a Cube prim has asizeattribute that does not need to be defined, and if it is not the cube will have a value of2.0. When changing themetersPerUnit, the operation needs to create thissizeattribute in order to scale its inferred value of2.0. These inferred attributes will only be created if they represent world space values and the prim of the attribute exists as a concretedefin the active edit layer.When changing the
upAxisof prims that don’t have geometry that can be rotated, the operation will add an additional xformOp:rotateX:upAxisCorrection attribute to correct the rotation of the prim.When changing the
upAxisof transforms and collapseXforms is enabled, the Edit Stage Metrics operation will collapse a prim’sxformOpstack into a single matrixxformOp. This creates a few cases with surprising behavior, for example if the edit stage layer contains anoveron a singlexformOpin a stack ofxformOpson a prim in the underlying sublayer/reference, this will cause the entirexformOpstack to have its up axis transformed even though only a part of the stack exists in the active edit layer.When
stopAtSkeletonRootis enabled, the operation stops scaling and changing the basis at the root prim (SkelRoot) of a skeleton. Rather than processing every prim in the skeleton hierarchy individually, a single scale and/or rotationxformOpis prepended to the skeleton root’s xform as the outermost transform so that the metrics correction is applied to the entire skeleton at once, and the prims below the skeleton root are left unprocessed.
Arguments#
Meters Per Unit#
The stage’s new meters per unit, where a value of 0.0 represents no change to the stage’s meters per units
Name:
metersPerUnitType:
floatDefault Value:
0.01
Up Axis#
The stage’s new up axis
Name:
upAxisType:
intDefault Value:
0
- Enum Values:
0: None
1: Y
2: Z
Collapse Xforms#
Collapse prim’s xformOps into a single matrix when changing up axis
Name:
collapseXformsType:
boolDefault Value:
False
Ignore Kit Cameras#
- Whether to ignore the special Kit viewport cameras (such as persp, front, top, right) when changing stage metrics.
Note: in UI mode the viewport applies its own correction to the viewport cameras, but in batch mode this should be disabled to ensure the cameras are corrected.
Name:
ignoreKitCamerasType:
boolDefault Value:
True
Stop At Skeleton Root#
Whether to stop scale and change of basis processing at the root prim (SkelRoot) of a skeleton. When enabled, instead of processing every prim in the skeleton hierarchy individually, a single scale and/or rotation xformOp is applied to the skeleton root’s xform and the prims below it are left unprocessed.
Name:
stopAtSkeletonRootType:
boolDefault Value:
False