In Maya 2013 devkit, some changes in C++ headers were required to avoid problems in Maya internals when C++ plug-ins were using the API. This changes will require to do some code change and recompile the affected plug-ins. One of this change is the copy constructor becoming private for the MFnBase class and all its descendant classes such as MFnDepencyNode, MFnDagNode, etc... where it used to be public by default in the past. I said 'by default' because the class definition never explicitly define the copy constructor, but instead the C++ compiler automatically generated a 'memory' copy constructor.
Unfortunately, this is an intentional change. The copy constructor on functionsets was never meant to be public but was automatically being generated by the compiler. Use of the copy constructor on functionsets results in internal corruption within Maya (which is also why the assignment operator has always been private).
The only good and safe approach is to initialize another instance of the functionset on the same object. I.e.:
MFnDependencyNode anotherFnDepNode (fnDepNode.object ()) ;
If you want a functionset to be passed as a method' argument, use a reference. I.e.:
void myFunction (MFnDependencyNode &fnDepNode) { ... }
Don't do this, but if you are desperate for a quick solution while your code was running ok for many years, you can use that trick to recompile your plug-in. But still I would strongly recommend you to make the require code change if you do not want to be in trouble later.
Here is what you could do - simply edit the MFnBase.h class and put the copy constructor back to public. Then the compiler will stop complaining and you will be able to recompile without code change, but corrupt Maya internals like in the past.
Comments