Hey TA.org,
Has anyone implemented the polymodifier base class found here in API 2.0?
https://help.autodesk.com/view/MAYAUL/2020/ENU/?guid=__py_ref_scripted_2poly_modifier_8py_example_html
Basically, I have some node/command modeling tool(s) that need undo functionality after mesh editing. I should have stuck with api 1.0, but I just wanted to make sure, is this even possible in 2.0? Implementing a proper dag node insertion/deletion and mesh caching undo mechanism? ala polymodifier.py
To implement undo for mesh editing commands I basically subclass this implementation, inheriting from the base class and overriding the appropriate methods:
https://download.autodesk.com/us/maya/2009help/api/poly_modifier_8py-example.html
Overiding the methods in a similar way to this uv split tool example:
https://help.autodesk.com/view/MAYAUL/2020/ENU/?guid=__py_ref_scripted_2split_u_v_cmd_8py_example_html
Works great, as long as all your code is all API 1.0. (I have memory corruption since my DoIt() code is api 2.0. It’s not too hard to convert, but yeah, would have been nice to use the 2.0 api.
Has anyone implemented polymodifier in API 2.0? All the autodesk examples don’t cover it…Seems like a big drawback to the API 2.0 if you cant leverage it in a similar fashion.
Just wanted to make sure before I write off the Python API 2.0 for these types of tools.
I tried converting the code in API 2.0, but we don’t have mutils, or the pointer handling, documentation is sparse so I’m giving up on that for now…It’s a bit over my head in terms of converting the pointers and such.