Skip to content

Commit 25f0c63

Browse files
committed
FnSceneShape: Add _FnSceneShapeProxy class
1 parent 186a357 commit 25f0c63

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎python/IECoreMaya/FnSceneShape.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,3 +793,15 @@ def promoteAttribute( self, attributeName, queryPath='/', nodePath='', mayaAttri
793793
@classmethod
794794
def _mayaNodeType( cls ):
795795
return "ieSceneShape"
796+
797+
798+
# A derived function set for operating on the IECoreMaya::SceneShapeProxy type.
799+
# It inherits all functionality from the base clase and we only override the `_mayaNodeType` method.
800+
# This object is used in the __new__ method of FnSceneShape to create the correct object depending
801+
# on the passed in node type
802+
class _FnSceneShapeProxy( FnSceneShape ) :
803+
804+
# Returns the maya node type that this function set operates on
805+
@classmethod
806+
def _mayaNodeType( cls ):
807+
return "ieSceneShapeProxy"

‎python/IECoreMaya/__init__.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,6 @@
101101
from . import Menus
102102
from . import SceneShapeUI
103103
from .FnSceneShape import FnSceneShape
104+
from .FnSceneShape import _FnSceneShapeProxy
104105

105106
__import__( "IECore" ).loadConfig( "CORTEX_STARTUP_PATHS", subdirectory = "IECoreMaya" )

0 commit comments

Comments
 (0)