Issues compiling example C++ plugins

Hey all,

I’m a newbie figuring out the Maya API, and I’m running into a problem when compiling certain example plugins provided in the Maya Devkit.

If any example plugin includes MPxTransform.h, I run into the following error:

Error	C4996	'Autodesk::Maya::OpenMaya20230000::MPxTransform::dirtyShear': MPxTransform should not manage built-in attribute Shear	myProject	C:\Program Files\Autodesk\Maya2023\include\maya\MPxTransform.h	205	

Other plugins compile nicely, though I haven’t tried many. My own test plugin that previously compiled and worked correctly also returns this error just by appending #include <maya/MPxTransform.h> to the file.

I think it’s an issue with my build env but I’m not so sure… I don’t understand why the Maya API would return a deprecation warning on itself. I’m using Visual Studio and the 2023 versions of the devkit, Maya, and the Maya API. (I think)

Anyways, any help would be appreciated on this <3

This is the expected behavior. :frowning:
Maya C++ API Reference, Deprecated List

Almost all dirty-Methods for MPxTransform() were canceled in Maya 2023.0, with the exception of _dirtyMatrix() and dirtyMatrix().
Later, almost all dirty-Methods for MPxTransform() were canceled in Maya 2022.4, with the exception of _dirtyMatrix() and dirtyMatrix().
At the same time, in the documentation of Maya, in the sections “What’s new in the Maya 2023 devkit” and “What’s new in the Maya 2022 devkit” is not mentioned about these changes.
In the documentation for the Maya 2022, these dirty-methods are not marked as "Deprecated "…
Probably because “Developer Help” for Autodesk Maya 2022.4 - does not exist!
Be aware that the offline developer help for Maya 2023.3 DOES NOT CONTAIN Maya API Reference !!!
The latest full version of offline developer help is for Maya 2023.2

Thank you for your reply :slight_smile:

I’m still a little confused, sorry. If I understand correctly, the dirty-Methods are cancelled in the version of the API I’m using (2023.0). But the devkit was not updated to account for this change?

If so, I still don’t understand why I get these errors if I #include <maya/MPxTransform.h> without using any dirty-Methods (or any MPxTransform methods at all) in my own plugin file that compiles correctly normally. Does that mean the whole of MPxTransform is deprecated?

Sorry if there’s something super simple that I’m missing haha