summaryrefslogtreecommitdiffstats
path: root/tools/objectsnapper/code/main/pluginMain.h
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /tools/objectsnapper/code/main/pluginMain.h
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'tools/objectsnapper/code/main/pluginMain.h')
-rw-r--r--tools/objectsnapper/code/main/pluginMain.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/objectsnapper/code/main/pluginMain.h b/tools/objectsnapper/code/main/pluginMain.h
new file mode 100644
index 0000000..502f6fb
--- /dev/null
+++ b/tools/objectsnapper/code/main/pluginMain.h
@@ -0,0 +1,40 @@
+#include "mayaincludes.h"
+
+//----------------------------------------
+// MACROS
+//----------------------------------------
+
+#define REGISTER_COMMAND( p, c ) if ( ! ( ( p ).registerCommand( c##::stringId, \
+ c##::creator ) \
+ ) \
+ ) return MS::kFailure
+
+#define REGISTER_CONTEXT( p, c ) if ( ! ( ( p ).registerContextCommand( c##::stringId, \
+ c##Cmd::creator ) \
+ ) \
+ ) return MS::kFailure
+
+
+#define REGISTER_LOCATOR( p, n ) if ( ! ( ( p ).registerNode( n##::stringId, \
+ n##::id, \
+ n##::creator, \
+ n##::initialize, \
+ MPxNode::kLocatorNode ) \
+ ) \
+ ) return MS::kFailure
+
+#define REGISTER_NODE( p, n ) if ( ! ( ( p ).registerNode( n##::stringId, \
+ n##::id, \
+ n##::creator, \
+ n##::initialize ) \
+ ) \
+ ) return MS::kFailure
+
+#define DEREGISTER_COMMAND( p, c ) ( p ).deregisterCommand( c##::stringId )
+
+#define DEREGISTER_CONTEXT( p, c ) ( p ).deregisterContextCommand( c##::stringId )
+
+//#define DEREGISTER_NODE( p, n ) n##::Unload();\
+// ( p ).deregisterNode( n##::id )
+
+#define DEREGISTER_NODE( p, n ) ( p ).deregisterNode( n##::id )