def __init__(self, parentRef):
        self.parentRef = parentRef
        self.win = pm.window(title="Joint Orientation", width=250, height=180)
        self.col = pm.columnLayout()
        self.row1 = pm.rowColumnLayout(width=200, numberOfColumns=2)
        self.rotateXText = pm.text(label="X rotate:", parent=self.row1)
        self.rotateXField = pm.intField(parent=self.row1)
        self.rotateYText = pm.text(label="Y rotate:", parent=self.row1)
        self.rotateYField = pm.intField(parent=self.row1)
        self.rotateZText = pm.text(label="Z rotate:", parent=self.row1)
        self.rotateZField = pm.intField(parent=self.row1)
        self.button = pm.button(
            label="Rotate Joints",
            width=200,
            command=lambda x: parentRef.rotateJoint(
                self.rotateXField.getValue(), self.rotateYField.getValue(),
                self.rotateZField.getValue()),
            parent=self.col)
        self.button = pm.button(label="Rotate Joints Relative",
                                width=200,
                                command=lambda x: parentRef.rotateJoint(
                                    self.rotateXField.getValue(),
                                    self.rotateYField.getValue(),
                                    self.rotateZField.getValue(),
                                    rotateRelative=True),
                                parent=self.col)

        self.win.show()
        self.win.setWidth(260)
        self.win.setHeight(210)
예제 #2
0
  def __init__(self, parentRef):
    self.parentRef = parentRef
    self.buttons = []
    self.window = pm.window( sizeable = False, title = "Selector", titleBar=True)
    with self.window:
        self.layout = pm.columnLayout()
        with self.layout:
            self.labFace = pm.text( label='A Useful Tool For Making Selections.', align='left',parent = self.layout )
            self.labFace = pm.text( label='Currently this tool only selects non quad faces.', align='left',parent = self.layout )
            self.labFace3 = pm.text( label='More features will be added to this tool in the future.', align='left',parent = self.layout )

            self.labFace4Blank = pm.text( label='           ', align='left',parent = self.layout )
            self.labFace4Blank = pm.text( label='           ', align='left',parent = self.layout )
            
            btn__find_non_quad_faces = pm.button ( label = 'Find-Quad Face Faces',parent = self.layout,
                        command = lambda xc: self.parentRef.highlightNonQuads(),width = 300  )
            self.buttons.append( btn__find_non_quad_faces )
            
            self.labTriResult = pm.text( label='Number of Triangles Found:', align='left', parent = self.layout )
            self.triFace = pm.intField(parent = self.layout, width = 40,value=0)
            self.labngonResult = pm.text( label='Number of n-Gons Found:', align='left', parent = self.layout )            
            self.ngonFace = pm.intField(parent = self.layout, width = 40,value=0)

            
    # Set the values?
    
    self.buttons.append( btn__find_non_quad_faces )                
    #pm.formLayout( form, edit=True,attachForm=[(self.labVtx,'top',10),(self.labVtx,'left',5),(self.layoutGrid,'top',30),(self.layoutGrid,'left',5),(self.labFace,'top',200),(self.labFace,'left',5),(btn_Face,'top',220),(btn_Face,'left',5),(self.labTriResult,'top',255),(self.labTriResult,'left',5),(self.triFace,'top',250),(self.triFace,'left',160),(self.ngonFace,'top',270),(self.ngonFace,'left',160),(self.labngonResult,'top',275),(self.labngonResult,'left',5)])
    
    # Show Window
    pm.showWindow(self.window)
    self.window.setWidth(600)
    self.window.setHeight(400)
예제 #3
0
    def __init__(self, parentRef):
        self.parentRef = parentRef
        self.buttons = []
        self.window = pm.window(sizeable=False,
                                title="Selector",
                                titleBar=True)
        with self.window:
            self.layout = pm.columnLayout()
            with self.layout:
                self.labFace = pm.text(
                    label='A Useful Tool For Making Selections.',
                    align='left',
                    parent=self.layout)
                self.labFace = pm.text(
                    label='Currently this tool only selects non quad faces.',
                    align='left',
                    parent=self.layout)
                self.labFace3 = pm.text(
                    label=
                    'More features will be added to this tool in the future.',
                    align='left',
                    parent=self.layout)

                self.labFace4Blank = pm.text(label='           ',
                                             align='left',
                                             parent=self.layout)
                self.labFace4Blank = pm.text(label='           ',
                                             align='left',
                                             parent=self.layout)

                btn__find_non_quad_faces = pm.button(
                    label='Find-Quad Face Faces',
                    parent=self.layout,
                    command=lambda xc: self.parentRef.highlightNonQuads(),
                    width=300)
                self.buttons.append(btn__find_non_quad_faces)

                self.labTriResult = pm.text(label='Number of Triangles Found:',
                                            align='left',
                                            parent=self.layout)
                self.triFace = pm.intField(parent=self.layout,
                                           width=40,
                                           value=0)
                self.labngonResult = pm.text(label='Number of n-Gons Found:',
                                             align='left',
                                             parent=self.layout)
                self.ngonFace = pm.intField(parent=self.layout,
                                            width=40,
                                            value=0)

        # Set the values?

        self.buttons.append(btn__find_non_quad_faces)
        #pm.formLayout( form, edit=True,attachForm=[(self.labVtx,'top',10),(self.labVtx,'left',5),(self.layoutGrid,'top',30),(self.layoutGrid,'left',5),(self.labFace,'top',200),(self.labFace,'left',5),(btn_Face,'top',220),(btn_Face,'left',5),(self.labTriResult,'top',255),(self.labTriResult,'left',5),(self.triFace,'top',250),(self.triFace,'left',160),(self.ngonFace,'top',270),(self.ngonFace,'left',160),(self.labngonResult,'top',275),(self.labngonResult,'left',5)])

        # Show Window
        pm.showWindow(self.window)
        self.window.setWidth(600)
        self.window.setHeight(400)
예제 #4
0
    def makeUi( self ):
        self.win = pm.window(title="Mr Clean")
        self.win.show()
        with self.win:
            self.col = pm.columnLayout()
            with self.col:
                self.win.setWidth( 400 )
                self.win.setHeight( 200 )

                self.precisionText = pm.text(
                "Precision:\n Accuracy of face check, higher is more precise \n" + 
                "but will allow smaller errors.\n" +
                "It's like the opposite of merge distance tolerance." )                                
                self.precision = pm.intField(  )
                self.precision.setValue( 2 )
                
                self.toleranceText = pm.text( "Tolerance" )                                
                self.tolerance = pm.floatField(  )
                self.tolerance.setValue( 0.01 )
                
                
                self.button = pm.button( 
                    "Mostly Safe Cleanup",
                     command = lambda x:    self.mrClean.mostlySafeCleanup(    self.precision.getValue(), self.tolerance.getValue()    )
                )
                
                self.warningText = pm.text(
                    "Beware, backup your model first,\n" + 
                    "since this tool might delete more of\n" +
                    "your model than you want it to. This\n" +
                    "tool often helps with *very* broken\n" +
                    "models, but it can potentially make\n" +
                    "changes even where there aren't problems\n" +
                    " on a model."
                )
  def __init__(self, parentRef):
    self.parentRef = parentRef
    self.win = pm.window( title="Joint Orientation", width=250, height=180)
    self.col = pm.columnLayout()
    self.row1 = pm.rowColumnLayout(
      width = 200, 
      numberOfColumns=2 
      )
    self.rotateXText = pm.text(
      label="X rotate:",
      parent=self.row1 )
    self.rotateXField = pm.intField(
      parent=self.row1 )
    self.rotateYText = pm.text(
      label="Y rotate:",
      parent=self.row1 )
    self.rotateYField = pm.intField(
      parent=self.row1 )
    self.rotateZText = pm.text(
      label="Z rotate:",
      parent=self.row1 )
    self.rotateZField = pm.intField(
      parent=self.row1 )
    self.button = pm.button(
      label="Rotate Joints",
      width=200,
      command = lambda x: parentRef.rotateJoint(
         self.rotateXField.getValue() ,self.rotateYField.getValue() ,self.rotateZField.getValue()   ),
         parent=self.col )
    self.button = pm.button(
      label="Rotate Joints Relative",
      width=200,
      command = lambda x: parentRef.rotateJoint(
         self.rotateXField.getValue() ,self.rotateYField.getValue() ,self.rotateZField.getValue(), rotateRelative=True   ),
         parent=self.col )

    
    
    self.win.show()
    self.win.setWidth(260)
    self.win.setHeight(210)
예제 #6
0
class MmmmShellThickenUi(object):
    def __init__(self, autorun=True ):
        self.shellThicken = MmmmShellThicken( )
        if autorun==True:
            self.createUi()
        
    def createUi(self):
        self.win = pm.window(title="Mmmm Shell Thicken")
        with self.win:
            self.col = pm.columnLayout()
            with self.col:
                self.thicknessLabel = pm.text( "Thickness:             " )
                self.thicknessFloatField = pm.floatField( value=1.0, precision=9, width=200 )
                self.divisionsLabel = pm.text( "Divisions:             " )
                self.divisionsIntField = pm.intField( value=1, width=200 )
                self.mergeLabel = pm.text( "Distance (tolerance) for verts merge:" )