WIP: Add basic delete implementation for component prims#4527
WIP: Add basic delete implementation for component prims#4527antonkhelou wants to merge 1 commit intodevfrom
Conversation
| layer->RemovePrimIfInert(parent); | ||
| } | ||
| } else if (!routingEditTarget.IsNull()) { | ||
| // NOTE: Need to consider the case of edit routing as well probably |
There was a problem hiding this comment.
is this a comment you added?
There was a problem hiding this comment.
yes, just as a note for myself when i was first spiking this.. wip
| = UsdUfe::getEditRouterEditTarget(UsdUfe::EditRoutingTokens->RouteDelete, _prim); | ||
|
|
||
| #ifdef UFE_V4_FEATURES_AVAILABLE | ||
| UsdUfe::UsdAttributes::removeAttributesConnections(_prim); |
There was a problem hiding this comment.
do we need anything for this? an cleanReferencedPath below
There was a problem hiding this comment.
To be tested but looking at the code i think I think removeAttributesConnections() will partially work work but we need to have EF active for this, assuming UsdShadeConnectableAPI::DisconnectSource() authors something. Then however the calls in there to "RemoveProperty()" wont work.
There was a problem hiding this comment.
But then again the current code only works if the connection / ref sources are on the same layer as the current edit target, otherwise itll leave broken connections behind... maybe we can for now just leave it be. But just try out what happens to be sure its not too terrible.
| if (!_prim.IsValid()) | ||
| return; | ||
|
|
||
| UsdUfe::enforceMutedLayer(_prim, "remove"); |
There was a problem hiding this comment.
prob good to pause ef just in case
| // Validate that a prim can be deleted in a component stage. | ||
| // Components only allow deleting prims whose path is contained within | ||
| // either the material or geometry scope | ||
| void validateComponentDelete(const PXR_NS::UsdPrim& prim) |
There was a problem hiding this comment.
so i guess youll move this to a shared h/cpp
No description provided.