[Closed] Creating a Modifier with a Gizmo
Hello, I am currently learning how to create custom scripted modifiers. I’ve found plenty of examples online of people creating one, but I’ve never seen one that has a gizmo. My question is if it is possible to create one and if so, could you give me a simple example?
My end goal would be to add a gizmo for the UVW_Xform modifier since I use that modifier all the time and it has always annoyed me that it doesn’t have a gizmo like the UVWMap modifier.
Only some scripted modifiers can have a gizmo, in particular the deformation modifiers have one natively.
However, it is rather easy to design your won gizmos in the form of scripted manipulator plugins.
In fact, the UVWMap modifier also has a Manipulator plugin that lets you adjust its gizmo size interactively in the viewport when you enable Manipulate mode.
I would suggest looking into how that was written, and trying to write your own Manipulator for the UVW_Xform. You can find its source code under
“C:\Program Files\Autodesk\3ds Max 2016\stdplugs\stdscripts\uvwmanip.ms”
I’m afraid I’m having trouble understanding the scripted manipulators examples given in the maxscript help file. If we write a scripted manipulator, does it know that it has to work with a modifier we have written in its canManipulate section of its code or do we have to specify within the modifier itself to use the manipulator plugin?
I am trying to read the Radius Manipulator example given in the help file, but I can’t even find a modifier in Max that has a “radius” parameter that uses it, so I can’t even begin testing and experimenting to see how it works.
For now I just want to create an empty modifier that does nothing, but has a gizmo that just prints some text in the listener when you move it just to get started. I’ll try to figure out the more complex stuff on my own.
btw, greetings from Bulgaria Bobo
Greeting to Bulgaria!
Sphere, Geosphere and Teapot all have a Radius property, and the Radius Manipulator ships with Max, so if you enable Manipulate mode, you can tweak their radius at will. It has been like that since Max 4, I think, so about 15 years
You create a Manipulator that checks the (class of the) current selection in the canManipulate handler and if there is a match, draws the gizmo. Your modifier itself does not have to know anything about the Manipulator, and you can write manipulators to add gizmos to anything that exists in Max, even if you did not write the original object or modifier.
I will try to post an example when I have a minute.