-
Notifications
You must be signed in to change notification settings - Fork 201
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
HYDRA-324: update proxy shape scene index to support interpret pick result #3028
HYDRA-324: update proxy shape scene index to support interpret pick result #3028
Conversation
perrauo-adsk
commented
Apr 18, 2023
•
edited
Loading
edited
- Update proxy shape scene index to support interpret pick result being developed internally.
return TfCreateRefPtr(new MayaUsdProxyShapeSceneIndex( | ||
// Flatten transforms, visibility, purpose, model, and material | ||
// bindings over hierarchies. | ||
HdFlatteningSceneIndex::New( |
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.
I am concerned about this. The New() method is no longer a constructor of just a MayaUsdProxyShapeSceneIndex: it always has a HdFlatteningSceneIndex that comes along with it, and there is no way of doing otherwise. Separation of concerns should apply here.
// Disable UfePath instances, passing in -1 to indicate this | ||
MayaUsd::ufe::usdPathToUfePathSegment(path, -1) }); |
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.
All instances is the default, please remove the -1 argument (especially if you're not using the proper defined constant).
MayaUsdProxyShapeBase* proxyShape) | ||
: ParentClass(inputSceneIndex) | ||
, _usdImagingStageSceneIndex(inputSceneIndex) | ||
, _usdImagingStageSceneIndex(usdImagingStageSceneIndex) |
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.
As far as I can tell, this is passed in as a argument to support a temporary workaround, and init on first use of _usdImagingStageSceneIndex. However, why is it the responsibility of the MayaUsdProxyShapeSceneIndex to set the stage in Populate() of something that is arguably external to it? Can't we set the stage onto the _usdImagingStageSceneIndex upon its construction? A proxy shape node's stage won't change.
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 MayaUsdProxyShapeSceneIndex also listens for changes:
void MayaUsdProxyShapeSceneIndex::ObjectsChanged(
const MayaUsdProxyStageObjectsChangedNotice& notice)
{
_usdImagingStageSceneIndex->ApplyPendingUpdates();
}
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.
Also please note, that changing the inner working of MayaUsdProxySHapeSceneIndex is out of scope for these changes. The intent is simply to change data source involve, and implementing the interpretDataSource. Changing the ::New is already a bit of a stretch and came as a result of needing to expose the proxyshapesceneindex as top level scene index.
@@ -25,12 +25,19 @@ | |||
#include <mayaUsd/nodes/proxyShapeBase.h> | |||
|
|||
#include <pxr/base/tf/refPtr.h> | |||
#include <pxr/imaging/hd/flatteningSceneIndex.h> |
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.
Could forward declare HdFlatteningSceneIndex.
#include <pxr/imaging/hd/renderIndex.h> | ||
#include <pxr/imaging/hd/sceneIndexPlugin.h> | ||
#include <pxr/imaging/hd/sceneIndexPluginRegistry.h> | ||
#include <pxr/usd/sdf/path.h> | ||
#include <pxr/usdImaging/usdImaging/stageSceneIndex.h> | ||
|
||
#if WANT_UFE_BUILD | ||
#include <ufe/path.h> |
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.
Could be forward declared.
#include <ufe/sceneItem.h> | ||
#include <ufe/selectionNotification.h> |
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.
Unused.
…uo/HYDRA-324/revise-proxy-shape-scene-index-to-match-new-scene-index-api-2