Example #1
0
 def do_move_uv(self):
     # get step
     step = 1
     # get direction
     clicked_btn = self.sender()
     btn_name = clicked_btn.objectName()
     direction_dict = {"l_up_btn": {"uValue": -step, "vValue": step},
                       "up_btn": {"vValue": step},
                       "r_up_btn": {"uValue": step, "vValue": step},
                       "left_btn": {"uValue": -step},
                       "right_btn": {"uValue": step},
                       "l_down_btn": {"uValue": -step, "vValue": -step},
                       "down_btn": {"vValue": -step},
                       "r_down_btn": {"uValue": step, "vValue": -step},
                       }
     # select uv of selection objects
     pm.mel.eval("PolySelectConvert 4")
     # do move
     pm.polyEditUVShell(**direction_dict[btn_name])
 def rotateShell(self, angle, pivot, aspect, *args, **kwargs):
     scaleDownU = float(aspect[0]) / float(aspect[1])
     scaleUpU = float(aspect[1]) / float(aspect[0])
     pm.polyEditUVShell(pivotU=pivot[0],
                        pivotV=pivot[1],
                        r=False,
                        scaleU=scaleDownU)
     pm.polyEditUVShell(pivotU=pivot[0], pivotV=pivot[1], a=angle)
     pm.polyEditUVShell(pivotU=pivot[0],
                        pivotV=pivot[1],
                        r=False,
                        scaleU=scaleUpU)
 def scaleShell(self, uv, pivot, *args, **kwargs):
     pm.polyEditUVShell(pivotU=pivot[0],
                        pivotV=pivot[1],
                        scaleU=uv[0],
                        scaleV=uv[1])
 def moveShell(self, uvw, *args, **kwargs):
     ''' moves the shell of a selection of uv's '''
     pm.polyEditUVShell(uValue=uvw[0], vValue=uvw[1])
Example #5
0
 def scaleShell(self, uv, pivot, *args, **kwargs):
   pm.polyEditUVShell(pivotU=pivot[0], pivotV=pivot[1], scaleU=uv[0], scaleV=uv[1])
Example #6
0
 def rotateShell(self, angle, pivot, aspect, *args, **kwargs):    
   scaleDownU = float(aspect[0])/float(aspect[1])
   scaleUpU = float(aspect[1])/float(aspect[0])
   pm.polyEditUVShell(pivotU=pivot[0], pivotV=pivot[1], r=False, scaleU=scaleDownU)
   pm.polyEditUVShell(pivotU=pivot[0], pivotV=pivot[1], a=angle)
   pm.polyEditUVShell(pivotU=pivot[0], pivotV=pivot[1], r=False, scaleU=scaleUpU)
Example #7
0
 def moveShell(self, uvw, *args, **kwargs):
   ''' moves the shell of a selection of uv's '''
   pm.polyEditUVShell(uValue=uvw[0],vValue=uvw[1])