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

mayaUsdDuplicate selects duplicated object. #2109

Merged
merged 3 commits into from
Feb 16, 2022

Conversation

ppt-adsk
Copy link
Collaborator

No description provided.


/// \class UfeSelectionUndoItem
/// \brief Record data needed to undo or redo select nodes sub-operations.
class UfeSelectionUndoItem : public OpUndoItem
Copy link
Collaborator Author

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
Copy link
Collaborator

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;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

pierrebai-adsk
pierrebai-adsk previously approved these changes Feb 16, 2022
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk left a 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!

@ppt-adsk ppt-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Feb 16, 2022
@seando-adsk seando-adsk merged commit 4ef328b into dev Feb 16, 2022
@seando-adsk seando-adsk deleted the tremblp/MAYA-114726/duplicate_set_selection branch February 16, 2022 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants