Search - User list
Full Version: What would be the proper way to set stage level metadata?
Root » Solaris and Karma » What would be the proper way to set stage level metadata?
calving
Hey Solaris folks,

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.
jsmack
you can set those on the usd rop, no?
tamte
also not sure if it's the same, but you can use ConfigureLayer LOP to set MetersPerUnit metadata
calving
Thanks, Tomas. ConfigureLayer LOP is definitely what I'm looking for…
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB