emrahgunduz
always eats his vegetables
Blog RSS Feed
  • twitter
  • friendfeed
  • linkedin
  • facebook
  • vimeo
  • flickr
  • lastfm
Auto Mirror Selected Using a Specific/Picked Object

Auto Mirror Selected Using a Specific/Picked Object

One of the missing parts of 3ds max is, you can’t find any APIs related to most of the functions. Mirroring is one of them. It has no functions that you can use from maxscript. Just “max mirror” which actually opens the mirror dialog toolbox.

Yet, there is another way for controlling max: dialog monitoring. If you are so tired of selecting objects that needs to be mirrored to a specific object, and selecting or picking that object, plus changing the axis to “use transform center”, this is the script for you.

Download Auto Mirror Script

macroScript AUTO_MIRROR category:"emrahgunduz.com" tooltip:"Auto mirror using MIRROROBJ" buttontext:"Auto Mirror" (   fn XMirror =   (     local Xhwnd=dialogMonitorOps.getWindowHandle()     local Xstring=UIAccessor.GetWindowText Xhwnd     --//--     if Xhwnd != undefined then       (       if Xstring != undefined and (findString Xstring "Mirror") != undefined then         (         UIAccessor.PressButtonByName Xhwnd "X"         UIAccessor.PressButtonByName Xhwnd "Instance"         UIAccessor.PressDefaultButton()         )       )     true   )   undo on (     MirrorOBJ = $MIRROROBJ     SelectedOBJ = $     toolMode.coordsys MirrorOBJ     toolMode.transformCenter()     dialogMonitorOps.registerNotification XMirror id:#findmirror     dialogMonitorOps.enabled=true     --//--     max mirror     --//--     dialogMonitorOps.unregisterNotification id:#findmirror     dialogMonitorOps.enabled=false     toolMode.coordsys #view     toolMode.selectionCenter()   ) )
This script assumes that you’ve an object named MIRROROBJ in the scene, which will be used as the base. The axis of this object will be our transform center. So keep in mind that and before using this script, add your mirror object and move it to anywhere you like.

Here are a few screenshots of how this script works:

  • Drag drop script to 3dsmax
  • Configure your user panel and add script to a quad menu
  • Rename your object as MIRROROBJ
  • Use quad menu option for mirroring
  • Mirroring accomplished
  • You can use any object, any angle, any location for mirroring

This post's short url is: http://emrg.me/4g

Calendar

May 2012
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  
Web Analytics
Author: Emrah Gunduz