-
Notifications
You must be signed in to change notification settings - Fork 203
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
mayaUsdDuplicate selects duplicated object. #2109
Conversation
|
||
/// \class UfeSelectionUndoItem | ||
/// \brief Record data needed to undo or redo select nodes sub-operations. | ||
class UfeSelectionUndoItem : public OpUndoItem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new UfeSelectionUndoItem class. Arguably the existing SelectionUndoItem should be transformed to hold a Ufe::Selection, because MSelectionList cannot hold Ufe::SceneItem's. At that point we can simply remove UfeSelectionUndoItem. This work is out of scope for this pull request.
// - USD duplicate to Maya: no path segment to add. | ||
Ufe::Path childPath = (fSrcPath.runTimeId() == getMayaRunTimeId()) | ||
? | ||
// Maya duplicate to USD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really small nit-pick, if the comment was before the '?' it would layout better.
void UfeSelectionUndoItem::invert() | ||
{ | ||
auto globalSn = Ufe::GlobalSelection::get(); | ||
auto previousSelection = *globalSn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the returned value ever be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the UFE global selection is initialized in Maya's model class, and we assert that the result is non-null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for those two minor comments, looks fine to me!
No description provided.