Hey guys,
All I am trying to do is to make a little python script to make my selected object mirror in the x,y,z axis.
import maya.cmds as cmds
faceSel = cmds.ls(sl=True)
cmds.polyMirrorFace( faceSel, p=(20, 0, 0), mm=0 )
Now this mirrors my object on the x axis fine but i cant seem to get it to mirror on the other axis?
also...is it possible to mirror from the pivot point and for the mirror to not weld the mirror object? i am guessing that is what mm=0 is for right?
Replies
Ok so i found that the direction = to the axis (0-5) but still cant figure out how to mirror from the objects pivot point.
import maya.cmds as cmds myObj = cmds.ls(sl=True)[0] myObjPos = cmds.getAttr('%s.scalePivot'%myObj)[0] cmds.polyMirrorFace( myObj, p=myObjPos, mm=0 )import maya.cmds as cmds sel = cmds.ls(sl=True) for obj in sel: myObjPos = cmds.getAttr('%s.scalePivot'%obj)[0] cmds.polyMirrorFace(obj, p=myObjPos, mm=0)