Hi all,
I’m developing a plug-in for Maya and I’m using the C++ API. My plug-in adds to Maya a simple custom command. Now, I need to share a state between all the instances of my command and I thought to do this by defining a new class that stores the state and passing a instance of it as an argument to the constructor of my command. Is there a clean way to do that? I thought about defining a callable class and pass it to the MFnPlugin::registerCommand function as the creatorFunction argument but it seems a bit intricate… (This is incorrect. See post #2)
P.S.: I can find no info about the MCreatorFunction class on the docs… maybe this class can help me? (Later I figure this out. See post #2)