Skip to content

Commit

Permalink
PrimUpdaterManager - Avoid unneeded SdfPath manipulations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jufrantz committed Jun 6, 2024
1 parent dda9735 commit c1b7602
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/mayaUsd/fileio/primUpdaterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,15 @@ void processPushExtras(
const SdfPath& srcRootPath,
const SdfPath& dstRootPath)
{
for (const auto& srcPaths : srcDagPathMap) {
const auto dstPrimPath = srcPaths.first.ReplacePrefix(srcRootPath, dstRootPath);
pushExtras.processItem(srcPaths.second, dstPrimPath);
if (srcRootPath == dstRootPath) {
for (const auto& srcPaths : srcDagPathMap) {
pushExtras.processItem(srcPaths.second, srcPaths.first);
}
} else {
for (const auto& srcPaths : srcDagPathMap) {
const auto dstPrimPath = srcPaths.first.ReplacePrefix(srcRootPath, dstRootPath);
pushExtras.processItem(srcPaths.second, dstPrimPath);
}
}
}

Expand Down

0 comments on commit c1b7602

Please sign in to comment.