BigRoy / usd-qtpy

Python Qt components for building custom USD tools.
MIT License
57 stars 8 forks source link

Bug: When renaming Prim in the Prim Hierarchy it moves it to the end of the siblings #15

Closed BigRoy closed 7 months ago

BigRoy commented 7 months ago

Upon renaming a Prim in the Hierarchy model it moves it to the end of the hierarchy instead of just renaming, keeping its index.

This is likely due to usd_qtpy.lib.usd.rename_prim going through usd_qtpy.lib.usd.move_prim_spec logic which ends up using Sdf.NamespaceEdit.ReparentAndRename but should actually - when staying under the same parent, use Sdf.NamespaceEdit.Rename which likely makes the prim keep its index among its siblings.