-
Notifications
You must be signed in to change notification settings - Fork 202
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
MAYA-105322 - No undo support for viewport selections of USD objects #940
Conversation
* Use new Ufe::NamedSelection "MayaSelectTool" for viewport selection, rather than modifying UFE global selection directly.
#if UFE_PREVIEW_VERSION_NUM < 2027 // #ifndef UFE_V2_FEATURES_AVAILABLE | ||
const MGlobal::ListAdjustment& listAdjustment = _globalListAdjustment; | ||
#endif |
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.
Don't this need var anymore with the new named selection code.
#if UFE_PREVIEW_VERSION_NUM >= 2027 // #ifdef UFE_V2_FEATURES_AVAILABLE | ||
auto ufeSel = Ufe::NamedSelection::get("MayaSelectTool"); | ||
ufeSel->append(si); | ||
#else |
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.
We simply append any items to select to this named selection. Maya takes care of the replace/toggle/add/deselect.
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.
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 |
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.
Fixed this ifdef as I noticed it was wrong.
I like the notion of named selection. Is it intended to support multiple named selections? |
@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. |
* Fixing build error (unused function).
MAYA-105322 - No undo support for viewport selections of USD objects