You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement a function that checks whether or not an edit can be made to a prim at the current edit target. I can do this through UsdPrim::GetPrimIndex by finding the edit target in the node range and checking PcpNodeRef::IsInert.
UsdPrim::GetPrimIndex doesn't include sites that do not (yet) contribute opinions as UsdPrim::ComputeExpandedPrimIndex does. But if I try and use ComputeExpandedPrimIndex then PcpNodeRef::IsInert always returns false, even on nodes that are inert with GetPrimIndex.
The reason appears to be because ComputeExpandedPrimIndex doesn't set the USD flag on the PcpPrimIndexInputs it creates which makes it so that instance proxies aren't marked as inert in Pcp_PrimIndexIsInstanceable.
This prevents me from checking if edits can be made to a prim at the current edit target when the edit target doesn't yet have contributing opinions to the prim.
UsdPrim::GetPrimIndex:
/root/instance/child is inert : 1
/instanced_root/child is inert : 0
UsdPrim::ComputeExpandedPrimIndex:
/root/instance/child is inert: 1
/root{variant=selected}instance/child is inert: 1
/instanced_root/child is inert: 0
Actual Output:
UsdPrim::GetPrimIndex:
/root/instance/child is inert : 1
/instanced_root/child is inert : 0
UsdPrim::ComputeExpandedPrimIndex:
/root/instance/child is inert: 0
/root{variant=selected}instance/child is inert: 0
/instanced_root/child is inert: 0
System Information (OS, Hardware)
Windows 10
Package Versions
USD 23.5.0
Build Flags
The text was updated successfully, but these errors were encountered:
Description of Issue
I'm trying to implement a function that checks whether or not an edit can be made to a prim at the current edit target. I can do this through UsdPrim::GetPrimIndex by finding the edit target in the node range and checking PcpNodeRef::IsInert.
UsdPrim::GetPrimIndex doesn't include sites that do not (yet) contribute opinions as UsdPrim::ComputeExpandedPrimIndex does. But if I try and use ComputeExpandedPrimIndex then PcpNodeRef::IsInert always returns false, even on nodes that are inert with GetPrimIndex.
The reason appears to be because ComputeExpandedPrimIndex doesn't set the USD flag on the PcpPrimIndexInputs it creates which makes it so that instance proxies aren't marked as inert in Pcp_PrimIndexIsInstanceable.
This prevents me from checking if edits can be made to a prim at the current edit target when the edit target doesn't yet have contributing opinions to the prim.
Originally posted about it in the AOUSD forums: https://forum.aousd.org/t/checking-if-a-prim-can-be-edited-at-edit-target/2182/1
Steps to Reproduce
Expected Output:
Actual Output:
System Information (OS, Hardware)
Windows 10
Package Versions
USD 23.5.0
Build Flags
The text was updated successfully, but these errors were encountered: