-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,9 @@ | |
#include <mayaUsd/ufe/UsdSceneItem.h> | ||
|
||
#include <ufe/globalSelection.h> | ||
#if UFE_PREVIEW_VERSION_NUM >= 2027 // #ifdef UFE_V2_FEATURES_AVAILABLE | ||
#include <ufe/namedSelection.h> | ||
#endif | ||
#include <ufe/observableSelection.h> | ||
#include <ufe/runTimeMgr.h> | ||
#include <ufe/scene.h> | ||
|
@@ -755,7 +758,9 @@ bool ProxyRenderDelegate::getInstancedSelectionPath( | |
// each intersection. | ||
#if defined(MAYA_ENABLE_UPDATE_FOR_SELECTION) | ||
const TfToken& selectionKind = _selectionKind; | ||
#if UFE_PREVIEW_VERSION_NUM < 2027 // #ifndef UFE_V2_FEATURES_AVAILABLE | ||
const MGlobal::ListAdjustment& listAdjustment = _globalListAdjustment; | ||
#endif | ||
#else | ||
const TfToken selectionKind = GetSelectionKind(); | ||
const MGlobal::ListAdjustment listAdjustment = GetListAdjustment(); | ||
|
@@ -783,6 +788,10 @@ bool ProxyRenderDelegate::getInstancedSelectionPath( | |
return false; | ||
} | ||
|
||
#if UFE_PREVIEW_VERSION_NUM >= 2027 // #ifdef UFE_V2_FEATURES_AVAILABLE | ||
auto ufeSel = Ufe::NamedSelection::get("MayaSelectTool"); | ||
ufeSel->append(si); | ||
#else | ||
Comment on lines
+791
to
+794
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Same changes in all the plugins. |
||
auto globalSelection = Ufe::GlobalSelection::get(); | ||
|
||
switch (listAdjustment) { | ||
|
@@ -802,6 +811,7 @@ bool ProxyRenderDelegate::getInstancedSelectionPath( | |
break; | ||
default: TF_WARN("Unexpected MGlobal::ListAdjustment enum for selection."); break; | ||
} | ||
#endif | ||
#else | ||
dagPath = _proxyShapeData->ProxyDagPath(); | ||
#endif | ||
|
@@ -812,7 +822,7 @@ bool ProxyRenderDelegate::getInstancedSelectionPath( | |
//! \brief Notify of selection change. | ||
void ProxyRenderDelegate::SelectionChanged() { _selectionChanged = true; } | ||
|
||
//! \brief Polulate lead and active selection for Rprims under the proxy shape. | ||
//! \brief Populate lead and active selection for Rprims under the proxy shape. | ||
void ProxyRenderDelegate::_PopulateSelection() | ||
{ | ||
#if defined(WANT_UFE_BUILD) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Fixed this ifdef as I noticed it was wrong. |
||
path.nbSegments(); | ||
#else | ||
path.getSegments().size(); | ||
|
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.