I'm wondering is there a way to edit stage level metadata? The below snippet doesn't work and the node.stage() either.
node = hou.pwd() stage = node.editableStage() from pxr import UsdGeom UsdGeom.SetStageMetersPerUnit(stage, 1)
Here is the exception message which is actually reasonable…
'Cannot set layer metadata 'metersPerUnit' in current edit target "anon:0000000090963380", as it is not the root layer or session layer of stage "anon:000000009049C900:root.usd".'
Since LOPs work with their own layers, the root operations are not supposed to work like this. However, the magic to do this is relatively important to us. Since the other hosts require these global variables to set up the scene.