Is there a scipt that can mirror a selection ?


#1

Hi :slight_smile:

Could someone please tell me if she/he knows of a script that would be able to mirror a selection of sub objects on an axis ? I have characters that I need to morph (pretty high res) and I would like to be able for exemple to select some vertices on a cheek (with soft selection) and mirror this selection to the other cheek instead of painfully trying to find the corresponding vertices on the other cheek :stuck_out_tongue: I tried scriptspot and found nothing, but sometiemes since English isn’t my native language (you probably noticed :wink: ) I don’t find because I don’t search for the right word :slight_smile:

Thanks in advance for any help :slight_smile:

Ab


#2

You could always detach the sub-object, mirror it and the re-attach it.


#3

Thanks Rens, you’re right, theoretically it should works but in practice it doesn’t. In fact, I can only move vertices, if I do any modification like detaching, cuting or anything like that then the vertex numbering changes and the morph doesn’t work anymore :frowning: Anyway, many thanks for taking the time to answer :slight_smile:

Ab


#4

You’re welcome :slight_smile:

I think it’s easily scriptable, but try this first:

  • Select the verts.
  • Go to either Move, Rotate or Scale mode.
  • Shift+click on an axis of the transform gizmo, don’t drag, just click.
  • Select either clone to element or to object.
  • Mirror and position.

Basically it’s the same as I described above, only now you clone the verts first.
Note that this works on both vertices and polygons, but not on edges. Also works with both Editable Poly and Editable Mesh.

  • Rens

#5

Thank you for your answer, I will give it a try :slight_smile:

Ab


#6

Have you consddered the mirror modifier? This will do what you ask.


#7

Thank you for your answer Pen but I can’t use the mirror modifier because I can’t cut the mesh. Well, maybe I didn’t explain myself very well (my English is VERY bad :frowning: ) but I need to modify models that are not used in max. Basically, I can import them in max, I can move, rotat, scale selections of vertices but that’s all. If I cut, mirror, use the symetry modifier, weld, then the order of the vertices will change and when I will export the morph to use it in the other application, very weird things will happen. That’s why I was more trying to find a way to select vertices on on side of my mesh and automatize the process of selecting the vertices on the other half. A friend of mine tried it in lightwave and it worked (it seems if you use the symmetry mode, when you select vertices on one half, corresponding vertices on the other half are automatically selected). Anyway, I can’t afford to buy lightwave and learn it just for this usage so I tried to find an equivalent in our good ol’ Max :slight_smile:

Thanks a lot for your answers :slight_smile:

Ab


#8

hi abraham, i wrote some functions in maxscript to do what you want, but they are part of a skinning script, so this will only work with the skin modifier applied to your object. basically, it can be easily changed to work on a normal editmesh or editpoly. if you are familiar with maxscript, you can try to rip off the functions and modify them to fit your needs… i would do it by myself, but i am close to going on holiday and won’t be back till monday, if you can wait that long, i will do it for you when i’m back…


#9

Ah sorry, I missed what you were looking for. Cthulhu vbmenu_register(“postmenu_1481761”, true); has the right idea, there is nothing built in for this but it can be scripted. I have started a script that does this but I haevn’t had time to finish the tool and release it. There is a paid plugin from http://www.di-o-matic.com guys called morph tool kit that does this and allot more. A great tool to have for anyone doing allot of morphing.


#10

:bounce: :bounce: :bounce: Sounds great Cthulhu :slight_smile: I will try and find your script and see what I can do (I never messed with maxscript so no idea if I’m able to do that (blush) Anyway I will at least try) Otherwise, I can surely wait, this problem bugs me since more than a month so a couple of days more is really no problem, just feeling bad to give you works to do :slight_smile: So, I will give it a try, and if I really can’t do it I will put a message here :slight_smile:
Many, many thanks :slight_smile:

Ab


#11

Thank you Pen, I will try to see if I’m able to adapt Cthulhu’s script to my use, seems to be exaclty what I need :slight_smile: And shame on me, I should really take the time to learn some scripting, always willing to use only the sunny side of our little Max :slight_smile:

Thanks to both of you for your help :slight_smile:

Ab


#12

Looks like even modifying an existing script is beyond my knowledge :sad:


#13

hey abraham, i finally found the time to write a quick script to mirror vertex selection, it works on both, editMesh and editPoly, but it’s slow if you try to mirror a lot of verts at the same time.

let me know if it works for you!

it’s a macroscript (put it into \ui\macroscripts) under the category “piranha-bytes”


#14

Many, many, many thanks Cthulhu, it works perfeclty :slight_smile: Most of the time I only need to select a few poly and then use soft selection so I have no speed problem at all :slight_smile:
Thank you soooo much :slight_smile:

Ab


#15

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.