Skip to content

Commit

Permalink
Fix example of setting metersPerUnit and upAxis on SdfLayer (#12)
Browse files Browse the repository at this point in the history
Thanks :)
  • Loading branch information
BigRoy authored Sep 22, 2023
1 parent ff858a5 commit c09d5d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/core/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,9 +1065,9 @@ def "cube" (
layer.startTimeCode = time_samples[0]
layer.endTimeCode = time_samples[-1]
# Scene Unit Scale
layer.SetInfo(UsdGeom.Tokens.metersPerUnit, UsdGeom.LinearUnits.centimeters)
layer.pseudoRoot.SetInfo(UsdGeom.Tokens.metersPerUnit, UsdGeom.LinearUnits.centimeters)
# Scene Up Axis
layer.SetInfo(UsdGeom.Tokens.upAxis, UsdGeom.Tokens.y) # Or UsdGeom.Tokens.z
layer.pseudoRoot.SetInfo(UsdGeom.Tokens.upAxis, UsdGeom.Tokens.y) # Or UsdGeom.Tokens.z
#// ANCHOR_END: metadataLayerMetrics

#// ANCHOR: debuggingTokens
Expand Down Expand Up @@ -4439,4 +4439,4 @@ def traversal_kernel(path):
extentsHint = root_geom_model_API.ComputeExtentsHint(bbox_cache)
root_geom_model_API.SetExtentsHint(extentsHint , frame)
#// ANCHOR_END: xformFull


0 comments on commit c09d5d3

Please sign in to comment.