Browse files

Support de/registering Transforms for both approaches

  • Loading branch information...
1 parent 866068d commit 28590966775fb20c5257327b178153e72b32fb00 Michael Jones committed Jan 10, 2012
Showing with 67 additions and 0 deletions.
  1. +23 −0 src/OpinionatedPluginHandler.hh
  2. +44 −0 src/PluginHandler.hh
View
23 src/OpinionatedPluginHandler.hh
@@ -207,6 +207,23 @@ public:
);
}
+ template< class TransformT >
+ MStatus handleTransform()
+ {
+ return m_pluginFn.registerTransform(
+ TransformT::nodeName,
+ TransformT::id,
+ TransformT::creator,
+ TransformT::initialize,
+ TransformT::xformCreatorFunction,
+ TransformT::xformId,
+ Classification<
+ TransformT,
+ ClassificationIsPresent< TransformT >::value
+ >::classification()
+ );
+ }
+
template< class CommandT >
MStatus handleCommand()
{
@@ -268,6 +285,12 @@ public:
return m_pluginFn.deregisterNode( ShapeT::id );
}
+ template< class TransformT >
+ MStatus handleTransform()
+ {
+ return m_pluginFn.deregisterNode( TransformT::id );
+ }
+
template< class CommandT >
MStatus handleCommand()
{
View
44 src/PluginHandler.hh
@@ -29,6 +29,16 @@ public:
const MString* classification = NULL
) = 0;
+ virtual MStatus handleTransform(
+ const MString& typeName,
+ const MTypeId& typeId,
+ MCreatorFunction creatorFunction,
+ MInitializeFunction initFunction,
+ MCreateXformMatrixFunction xformCreatorFunction,
+ const MTypeId& xformId,
+ const MString* classification = NULL
+ ) = 0;
+
virtual MStatus handleCommand(
const MString& commandName,
MCreatorFunction creatorFunction,
@@ -93,6 +103,27 @@ public:
);
}
+ MStatus handleTransform(
+ const MString& typeName,
+ const MTypeId& typeId,
+ MCreatorFunction creatorFunction,
+ MInitializeFunction initFunction,
+ MCreateXformMatrixFunction xformCreatorFunction,
+ const MTypeId& xformId,
+ const MString* classification = NULL
+ )
+ {
+ return m_pluginFn.registerTransform(
+ typeName,
+ typeId,
+ creatorFunction,
+ initFunction,
+ xformCreatorFunction,
+ xformId,
+ classification
+ );
+ }
+
MStatus handleCommand(
const MString& commandName,
MCreatorFunction creatorFunction,
@@ -169,6 +200,19 @@ public:
return m_pluginFn.deregisterNode( typeId );
}
+ MStatus handleTransform(
+ const MString&,
+ const MTypeId& typeId,
+ MCreatorFunction,
+ MInitializeFunction,
+ MCreateXformMatrixFunction,
+ const MTypeId&,
+ const MString* = NULL
+ )
+ {
+ return m_pluginFn.deregisterNode( typeId );
+ }
+
MStatus handleCommand(
const MString& commandName,
MCreatorFunction,

0 comments on commit 2859096

Please sign in to comment.