Encountering an Issue with USD Tutorial: Unparenting Error

I’m experiencing a minor hiccup in the USD tutorial I’m working on. Everything goes smoothly up until the
final step:
Open the menu Edit while the prim is selected, and click on unparent. Now instead of being under World, mock_robot is parallel to World.

The expected result should be that the “mock_robot” prim, previously nested under “World,” becomes parallel to “World.” However, an error message pops up:
Error:

2024-01-15 10:55:28 [43,178ms] [Error] [omni.usd.commands.usd_commands] Cannot move/rename >ancestral prim /World/Workingwithusd2/mock_robot

Current Status

I’m a bit puzzled about why the unparenting isn’t working as it should. For context, I’m working on Ubuntu 20.04 on my desktop. Any insights or assistance in resolving this issue would be greatly appreciated.

@sweetyleah0 i am just another OV user, so take my feedback as a grain of salt. my interpretation is you’d want to unparent in the first USD file rather than doing so in the second USD file, like what you are showing in your screenshot.

in your case, you have one USD file Workingwithusd2 containing all the prims, lights, etc. And in the second USD file, you have an empty scene with Workingwithusd2 referenced in. Workingwithusd2 is your ‘source’ or ‘original’ USD; to that point, you won’t be able to edit the source from within this second file. this is exactly what the doc is referring to here:

You cannot delete them on the new stage because they are loaded by reference

so what’s the deal with the ancestral warning? well, that’s OV telling you that you can’t edit what’s referenced. you will have to open up the Workingwithusd2 USD file to make necessary changes, which should consequently update any and all references used in other USD files (like the second USD file you created). therefore, the section where it instructs you to unparent, should be done to the source USD (Workingwithusd2.usd) and not in the second USD. below is a screenshot of what you should see in your source USD after setting mock_robot as the default prim (the only difference between yours and mine is yours will still have contents inside of World):

image

(for the mods/devs - i suppose a more specific instruction with which file to carry out the unparent function and/or an additional screenshot could help alleviate the confusion for users new to the app/USD concept.)

but once you’ve done it, the following prims will be ignored when you reference Workingwithusd2.usd into another file. because they are no longer under the old default prim (World); only the new default prim (mock_robot and its child prims) will be seen in the new file instead:

  • PhysicsScene
  • GroundPlane
  • SphereLight

All in all, that’s how OpenUSD and its composition arcs work. if you plan to reference USD A into USD B, know that only prims that are children of the default prim (in USD A) will come into USD B; the rest will be left out upon referencing. the benefit of making another prim (mock_robot) as the default prim is allowing you to work in USD A with all the other prims like physics scene, ground plane, and lights rather than deleting them straight out, which will make your entire scene dark, without ground plane, and hard to work with when you find yourself needing to make additional changes in USD A (Workingwithusd2.usd)

P.S. fun experiment - if you have a USD without a default prim defined and tries to reference it into another file, nothing will come through 🙂

2 Likes