Say goodbye to scripts that only work with Editable Poly and not Edit Poly modifier. PolyModOp is a MAXScript struct wrapping the Edit Poly methods using the familiar signatures of the polyop methods. That means you check once at the beginning what kind of object you are dealing with, pick either polyop or polymodop, and the rest of the code will be the same as if you were writing it for Editable Poly.
See the Border Fill script for an example tool (the main aim is ease of coding and maintainability, so don't expect it to work lightning fast on complex meshes). Released under ISC license to be as permissive as possible (in short do what you will with it, just don't blame me for the result). The methods that are not implemented are listed in the missing_methods text file.
If you think think the current way of working with the Edit poly modifier is limited and should be changed, and you want a better solution, be sure to vote up PolyModOp functions same way as PolyOp functions at 3ds Max Ideas.
Installation: Copy the .ms file inside the stdscripts folder (evaluate once if this is your first time using it), that way it will be available for scripts in the script folder and macroscripts. FileIn approach is another alternative.
Usage: There are many ways to skin a cat, what I do is define one local (polySwitch in my case) to hold polyop/polymodop struct and initialize it on execution:
obj = modPanel.getCurrentObject() polySwitch = if isKindOf polyModOp structDef AND isKindOf obj Edit_Poly then polyModOp else polyOp
In the rest of the code, use all the methods as if you were using polyop methods. Since I use modPanel.getCurrentObject() to get the obj, I've written it with that in mind. Which means that unless you supply a node: parameter, the coords will be local to the Edit_Poly/Editable_Poly object. Many of the methods need the modify panel to be active, there are only a few of them that don't. I don't have a list, you can report your success in using them that way and I will add the comments.
Some of the methods might not work as expected so exercise caution. I haven't tested each of them.
There's no readme and no FAQ, so don't be afraid to ask. Feedback and improvement suggestions are appeciated, too.
0.02a: added get/setRefCoordsys check
0.01a: initial release