Hello,
I came across some differences when using OpenUSD in standalone, vs using the same code within Houdini in a python node or just using Hython (Houdini’s python). (I am using OpenUSD 24.03 and Houdini-20.5.410)
I have a simple abc file with a camera exported from maya.
It holds the following hierarchy (a simple maya camera):
- camera
- cameraShape
I then created a simple USD stage that payloads this abc under a “/camera” primitive.
When traversing this USD with python + OpenUSD or using usdview, I only get the camera primitive that is a UsdGeomCamera. (As if we disable “Display Shapes” in maya.) So this is the behavior I would expect when using USD and payloading an abc.
But if I payload or reference this USD in Houdini, I now see both in the hierarchy (camera as a Xform, and cameraShape as a UsdGeomCamera). I get the same result when traversing the stage but using hython instead of python+openusd, or when using usdview with the Houdini environment (having Houdini’s version of USD).
My issue is that in I set some attributes on the UsdGeomCamera in standalone USD, and then when opening in Houdini those attributes aren’t on the correct primitive since the camera becomes an Xform and the Shape is now the UsdGeomCamera.
Is there some configuration somewhere that manages how abc are payloaded into the USD (expanding the shapes or not) ? How could I get an identical behaviour when using OpenUSD standlone and Houdini’s USD ?
Here is a screenshot of the differences (Houdini’s usdview on the left, vs OpenUsd’s usdview on the right):
Same when just using the python api with the following code:
stage = pxr.Usd.Stage.Open(<path_to_usd_stage)
print("---------")
for prim in stage.TraverseAll():
print(prim)
With OpenUsd and python I get:
---------
Usd.Prim(</camera>)
But with hython I get:
---------
Usd.Prim(</camera>)
Usd.Prim(</camera/cameraShape>)
Here is the usd_stage payloading the camera.abc
camera_stage.zip (1.4 KB)
Thank you for the help