[Closed] maxscript scripted plugin modifier
hi guys,
after 4 years of maxscript, it’s my first attempt with scripted plugin modifier, but I’m getting unable to do what i mean.
I want that I may have any object (primitive such as box, teapot; or editable_poly or whatever with stack hierarchy), on which i apply this modifier, and it changes it’s mesh to something. AND IT SHALL NOT CHANGE $.baseObject.mesh, but only the mesh in the modifier.
Just like any Edit_Poly or FaceExtrude does.
This is a code i have taken from the maxscript help to learn this.
when my code runs through
or
and if i put that function i wrote above inside of this, it just creates a new object with that mesh, but i can’t set that mesh to THIS MODIFIER .
I have also tried using setface, getface etc etc, but as I don’t have any mesh related to this modifier i don’t know where to set.
what i want is like: we put a FaceExtrude or a Shell above our object, and it changes my object mesh, but when i don’t need it anymore, i remove the modifier and i haven’t lost anything below the modifier.
I’ve seen people doing
$.baseobject.mesh = …,
and that is exaclty what i really don’t want to do.
Could somebody just show the correct path?
- How we can make modifiers which edits the mesh without touching anything below the modifier?
Thanks a lot.
There’s a code tag, use it. For what you want to do, look up simpleMeshMod in the maxscript reference.