Notifications
Clear all
[Closed] Mirror tool help
May 04, 2013 6:18 pm
Hi, I made this mirror tool, and I would like it to work interactively like the default mirror from 3ds max. Can someone show me how to achieve that result?
macroScript waRp_Mirror
category:"waRp Tools"
buttonText:"waRp Mirror"
tooltip:"waRp Mirror"
icon:#("warp_tools_mirror",1)
(
rollout waRp_Mirror "waRp Mirror" width:144 height:202
(
groupBox gb_axis "Axis" pos:[8,11] width:127 height:45
radioButtons rb_axis "" pos:[22,28] width:97 height:16 labels:#("X", "Y", "Z") columns:3
groupBox gb_clone "Clone Selection" pos:[9,67] width:127 height:60
radioButtons rb_clone "" pos:[20,86] width:64 height:32 labels:#("Copy", "No Clone") columns:1
checkbox cb_collapse "Collapse All" pos:[11,136] width:80 height:20
button btn_mirror "Mirror" pos:[41,163] width:61 height:25
on btn_mirror pressed do
(
--prvo removeTurbo pa collapsni go poly-to
macros.run "waRp Tools" "waRp_RemoveTurbo"
ConvertToPoly(selection as array)
--- CLONE SELECTION ---
if rb_clone.state == 1 then
(
maxOps.cloneNodes $ cloneType:#copy newNodes:&nnl
select nnl
)
--- ---
--- XFORM MODIFIER ---
myXform= xform()
myxform.gizmo.scale=[-1,-1,-1]
if rb_axis.state == 1 then
myxform.gizmo.rotation += quat 1 0 0 0 -- za X axis
else if rb_axis.state == 2 then
(
myxform.gizmo.rotation += quat 1 0 0 0 -- za X axis
myxform.gizmo.rotation += quat 0 0 1 0 -- dopolnitelno za Y axis
)
else
myxform.gizmo.rotation += quat 0 0 1 0 -- za Z axis
modpanel.addModToSelection(myXform)
--- ---
--- NORMAL MODIFIER ---
myNormal = Normalmodifier()
myNormal.flip=true
modPanel.addModToSelection(myNormal)
--- ---
-- collapse objects
if cb_collapse.checked then
ConvertToPoly(selection as array) --convertTo $ PolyMeshObject
)
)
createDialog waRp_Mirror
)