diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /mayaPlug/shaveCallbacks.h | |
| download | shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'mayaPlug/shaveCallbacks.h')
| -rw-r--r-- | mayaPlug/shaveCallbacks.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/mayaPlug/shaveCallbacks.h b/mayaPlug/shaveCallbacks.h new file mode 100644 index 0000000..592a6c9 --- /dev/null +++ b/mayaPlug/shaveCallbacks.h @@ -0,0 +1,98 @@ +#ifndef shaveCallbacks_h +#define shaveCallbacks_h +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +#include <maya/MMessage.h> + +#if MAYA_API_VERSION < 20180000 +class MObject; +#endif + +class shaveCallbacks +{ +public: + static void endLoad(bool isImport, bool isReference); + static void mayaExiting(void* clientData = NULL); + static void prepareForNewScene(bool firstTime); + static void registerCallbacks(); + static void removeCallbacks(); + static void setCleanUpMELOnExit(bool cleanUp) + { mCleanUpMELOnExit = cleanUp; } + static void startLoad(); + +private: + // + // Callback Methods + // + static void beforeExport(void* clientData); + static void afterExport(void* clientData); + + static void beforeImport(void* clientData); + static void afterImport(void* clientData); + + static void beforeImportReference(void* clientData); + static void afterImportReference(void* clientData); + + static void afterNew(void* clientData); + + static void beforeOpen(void* clientData); + static void afterOpen(void* clientData); + + static void beforeReference(void* clientData); + static void afterReference(void* clientData); + + static void beforeSave(void* clientData); + static void afterSave(void* clientData); + + static void nodeCreated(MObject& node, void* clientData); + static void shaveNodeDeleted(MObject& node, void* clientData); + + static void selectionChanged(void* clientData); + + // + // Utility Methods + // + static void firstHairNode(); + static void initializeHairNodes(); + static void removeCallback(MCallbackId& id); + static void unlockShaveGlobals(); + static void updateNodeVersions(); + + // + // Member Variables + // + static bool mCleanUpMELOnExit; + + // + // Callback IDs + // + static MCallbackId beforeExportID; + static MCallbackId afterExportID; + + static MCallbackId beforeImportID; + static MCallbackId afterImportID; + + static MCallbackId beforeImportRefID; + static MCallbackId afterImportRefID; + + static MCallbackId beforeOpenID; + static MCallbackId afterOpenID; + + static MCallbackId beforeReferenceID; + static MCallbackId afterReferenceID; + + static MCallbackId beforeSaveID; + static MCallbackId afterSaveID; + + static MCallbackId afterNewID; + + static MCallbackId nodeCreatedID; + static MCallbackId shaveNodeDeletedID; + + static MCallbackId mayaExitingID; + static MCallbackId selectionChangedID; +}; + +#endif |