Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAYA-128044: Outliner: Renaming prims changes icon to def #2940

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/mayaUsd/ufe/UsdUndoRenameCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ static void sendNotificationToAllStageProxies(
if (proxyStage != stage)
continue;

// For all the proxy shapes that are mapping the same stage, we need to fixup the
// Ufe path since they have different Ufe Paths because it contains proxy shape name.
const Ufe::PathSegment proxySegment(std::string("|world") + proxyName, mayaId, '|');

const Ufe::PathSegment& srcUsdSegment = srcPath.getSegments()[1];
Expand Down Expand Up @@ -201,9 +203,9 @@ void UsdUndoRenameCommand::renameRedo()
// Note: must fetch prim again from its path because undo/redo of composite commands
// (or doing multiple undo and then multiple redo) can make the cached prim
// stale.
const UsdPrim prim = _stage->GetPrimAtPath(_ufeSrcItem->prim().GetPath());
const UsdPrim srcPrim = _stage->GetPrimAtPath(_ufeSrcItem->prim().GetPath());

doUsdRename(_stage, prim, _newName, srcPath, dstPath);
doUsdRename(_stage, srcPrim, _newName, srcPath, dstPath);

// the renamed scene item is a "sibling" of its original name.
_ufeDstItem = createSiblingSceneItem(srcPath, _newName);
Expand All @@ -214,7 +216,7 @@ void UsdUndoRenameCommand::renameRedo()
}

// send notification to update UFE data model
sendNotificationToAllStageProxies(_stage, prim, srcPath, dstPath);
sendNotificationToAllStageProxies(_stage, _ufeDstItem->prim(), srcPath, dstPath);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to use the new prim when sending notifs (not the source prim from before rename).

}

void UsdUndoRenameCommand::renameUndo()
Expand Down