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-105322 - No undo support for viewport selections of USD objects #940

Conversation

seando-adsk
Copy link
Collaborator

MAYA-105322 - No undo support for viewport selections of USD objects

  • Use new Ufe::NamedSelection "MayaSelectTool" for viewport selection, rather than modifying UFE global selection directly.

* Use new Ufe::NamedSelection "MayaSelectTool" for viewport
  selection, rather than modifying UFE global selection directly.
Comment on lines +761 to +763
#if UFE_PREVIEW_VERSION_NUM < 2027 // #ifndef UFE_V2_FEATURES_AVAILABLE
const MGlobal::ListAdjustment& listAdjustment = _globalListAdjustment;
#endif
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't this need var anymore with the new named selection code.

Comment on lines +791 to +794
#if UFE_PREVIEW_VERSION_NUM >= 2027 // #ifdef UFE_V2_FEATURES_AVAILABLE
auto ufeSel = Ufe::NamedSelection::get("MayaSelectTool");
ufeSel->append(si);
#else
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We simply append any items to select to this named selection. Maya takes care of the replace/toggle/add/deselect.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same changes in all the plugins.

@@ -70,7 +70,7 @@ void UsdStageMap::addItem(const Ufe::Path& path, UsdStageWeakPtr stage)
{
// We expect a path to the proxy shape node, therefore a single segment.
auto nbSegments =
#ifdef UFE_V0_2_6_FEATURES_AVAILABLE
#if UFE_PREVIEW_VERSION_NUM >= 2006
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed this ifdef as I noticed it was wrong.

@kxl-adsk kxl-adsk added legacy rendering Related to draw override rendering mtoh Related to legacy Maya to Hydra plugin. vp2renderdelegate Related to VP2RenderDelegate labels Nov 23, 2020
@huidong-chen
Copy link

I like the notion of named selection. Is it intended to support multiple named selections?

@seando-adsk
Copy link
Collaborator Author

@HdC-adsk Yes, UFE supports any number of named selections. The first time you get one with a specific name it will be created. Subsequent calls to get with that name return the same one.

@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Nov 24, 2020
@kxl-adsk kxl-adsk merged commit a0d2df6 into dev Nov 25, 2020
@kxl-adsk kxl-adsk deleted the donnels/MAYA-105322/no_undo_support_for_viewport_selections_of_usd_objects branch November 25, 2020 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy rendering Related to draw override rendering mtoh Related to legacy Maya to Hydra plugin. ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants