Skip to content

Commit

Permalink
First commit for Scene delegate code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
roopavr-adsk committed Mar 12, 2024
1 parent cbc1440 commit cdab016
Show file tree
Hide file tree
Showing 34 changed files with 106 additions and 3,779 deletions.
3 changes: 0 additions & 3 deletions doc/mayaHydraDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ The maya-usd plugin provides access to USD data files inside Maya by injecting t

Experimentally, we have separated the two plugins so that they no longer link together. We use USD's HdSceneIndexPluginRegistry interface to query for a registered HdSceneIndex provider for a Maya node, using a naming convention based on the node type name. Our hope is that this can also be the entry point for third-party plugins to control the viewport rendering of custom node types (MPxLocatorNode or MPxSurfaceShape) purely through the Hydra API instead of through Maya's various viewport APIs. This could potentially replace the Maya APIs MPxSubsceneOverride, MPxDrawOverride, and MPxGeometryOverride.

### Scene Delegate vs Scene Index
MayaHydra's long term plan is to migrate to using Scene Index completely and remove dependency on SceneDelegates. This aligns with the Pixar's recommendation as Hydra will eventually deprecate Scene Delegate support. During this transition phase, we are supporting both Scene Delegate and Scene Indices. By default, Scene Index is used but it can be overridden to use Scene Delegate using the environment variable ```MAYA_HYDRA_ENABLE_NATIVE_SCENE_INDEX``` to 0. Please note that Scene Delegate mode will not be actively supported and the Scene Index mode is the recommended one.

### Plugin initialization, render loop and data flow through the plugin.
As described in the section above, the plugin hooks into Maya Viewport through the MRenderOverride API.

Expand Down
2 changes: 1 addition & 1 deletion lib/mayaHydra/hydraExtensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set(HEADERS
api.h
debugCodes.h
hydraUtils.h
mayaHydraParams.h
mayaHydraLibInterface.h
mayaHydraLibInterfaceImp.h
mayaUtils.h
Expand Down Expand Up @@ -200,5 +201,4 @@ endif()
# subdirectories
# -----------------------------------------------------------------------------
add_subdirectory(adapters)
add_subdirectory(delegates)
add_subdirectory(sceneIndex)
16 changes: 15 additions & 1 deletion lib/mayaHydra/hydraExtensions/adapters/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,26 @@
#define MAYAHYDRALIB_ADAPTER_H

#include <mayaHydraLib/api.h>
#include <mayaHydraLib/delegates/delegateCtx.h>

#include <pxr/imaging/hd/sceneDelegate.h>
#include <pxr/pxr.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/base/arch/hints.h>
#include <pxr/base/gf/interval.h>
#include <pxr/imaging/hd/engine.h>
#include <pxr/imaging/hd/renderIndex.h>
#include <pxr/imaging/hd/rendererPlugin.h>
#include <pxr/imaging/hd/selection.h>
#include <pxr/imaging/hdx/pickTask.h>
#include <pxr/imaging/hdx/taskController.h>

#include <maya/MMessage.h>
#include <maya/MAnimControl.h>
#include <maya/MDGContextGuard.h>
#include <maya/MDrawContext.h>
#include <maya/MPointArray.h>
#include <maya/MSelectionContext.h>
#include <maya/MSelectionList.h>

#include <vector>

Expand Down
1 change: 0 additions & 1 deletion lib/mayaHydra/hydraExtensions/adapters/adapterRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <mayaHydraLib/adapters/materialAdapter.h>
#include <mayaHydraLib/adapters/renderItemAdapter.h>
#include <mayaHydraLib/adapters/shapeAdapter.h>
#include <mayaHydraLib/delegates/delegateCtx.h>

#include <pxr/base/tf/singleton.h>
#include <pxr/pxr.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <mayaHydraLib/adapters/adapterRegistry.h>
#include <mayaHydraLib/adapters/mayaAttrs.h>
#include <mayaHydraLib/adapters/tokens.h>
#include <mayaHydraLib/delegates/sceneDelegate.h>
#include <mayaHydraLib/mayaHydraSceneProducer.h>

#include <pxr/base/plug/plugin.h>
Expand Down
42 changes: 0 additions & 42 deletions lib/mayaHydra/hydraExtensions/delegates/CMakeLists.txt

This file was deleted.

228 changes: 0 additions & 228 deletions lib/mayaHydra/hydraExtensions/delegates/defaultLightDelegate.cpp

This file was deleted.

Loading

0 comments on commit cdab016

Please sign in to comment.