コード例 #1
0
ファイル: sal_GUI.py プロジェクト: zhuo2015/fs-tech-artist
 def create(self):
     self.mainLayout = pm.columnLayout(adjustableColumn=True)
     self.infoLayout = pm.columnLayout(adjustableColumn=True)
     pm.setParent(self.mainLayout)
     self.layout = pm.columnLayout(adjustableColumn=True)
     pm.setParent(self.layout)
     self.total = sal.Total_Grades03()
     self.total.create()
     
     pm.button(label = 'Output Grade and Comment', command = pm.Callback(self.check))
     
     pm.setParent(self.layout)
     grading = pm.frameLayout( label= 'Grading', cll = True, cl = True , borderStyle = 'etchedIn', w = 480)
     
     self.lighting = sal.Grading_Section(name = 'Lighting',
             fileName = r"%s/Comments/proj07_lighting.txt" % (self.path),
             field = self.total.queryLight(), toUpdate = self.total)
     self.lighting.create()
     
     
     pm.setParent(grading)
     
     self.mat = sal.Grading_Section(name = 'Materials/Textures',
             fileName = r"%s/Comments/proj07_mat.txt" % (self.path),
             field = self.total.queryMat(), toUpdate = self.total)
     self.mat.create()
     
     
     pm.setParent(grading)
     
     self.compFocal = sal.Grading_Section02(name = 'Comp/Focal Length',
             fileName = r"%s/Comments/proj07_compFocal.txt" % (self.path),
             field = self.total.queryComp(), toUpdate = self.total)
     self.compFocal.create()
     
     pm.setParent(grading)
     
     self.antiAliasing = sal.Grading_Section02(name = 'Antialias/Noise Qual',
             fileName = r"%s/Comments/proj07_antiAliasing.txt" % (self.path),
             field = self.total.queryAnti(), toUpdate = self.total)
     self.antiAliasing.create()
     
     pm.setParent(grading)
     
     self.pro = sal.Grading_Prof02(name = 'Professionalism',
             fileName = r"%s/Comments/proj07_prof.txt" % (self.path),
             field = self.total.queryPro(),
             fileStart = r"%s/Startup/proj07_start.db" % (self.path),
             toUpdate = self.total, infoParent= self.infoLayout)
     self.pro.create()
     
     pm.setParent(self.infoLayout)
     self.info = sal.Images(self.pro)
     
     return self.layout
コード例 #2
0
def gui():
    if(pm.window(win, ex = True)):
        pm.deleteUI(win)
        
    if(pm.windowPref(win, ex = True)):
        pm.windowPref(win, remove = True)
    
    myWin = pm.window(win, title='Testing' , sizeable = True, mnb = True, width = 480, height = 900,  backgroundColor = [.5, .5, .5])
    pm.scrollLayout()
    main01 = pm.columnLayout( adjustableColumn=True )
    main02 = pm.columnLayout( adjustableColumn=True )

    pm.setParent(main02)
    # file info section
    
    pm.frameLayout(label = 'File Info', cll = True, cl = False, borderStyle = 'etchedIn', w = 480)
    global fileInfo
    fileInfo = sal.Images()
    pm.setParent(main02)
     # grade total section
    infoFrame = pm.frameLayout( label = 'Grades Total', cll = True, cl = True , borderStyle = 'etchedIn', w = 480 )
    infoLayout = pm.formLayout()
    # isntancing the total grade section
    global totalGrades
    totalGrades = sal.UpperSection()
    totalGrades.create()
    
    pm.setParent(infoFrame)
    pm.button( label = 'Output Grade and Comment' , command = checkWeighting)
    
    pm.setParent(main02)
    pm.frameLayout( label = 'Grade', cll = True, cl = True , borderStyle = 'etchedIn', w = 480 )
    mainLayout = pm.formLayout()
   
    # grading / commenting section
    # first intance of Section for antiAliasing / Noise Quality
    global antiAlising, compFocalLenght, prof
    antiAlising = sal.Section( name = 'Anitalias/Noise Qual', layout = mainLayout , updateCommand = totalGrades,
                              fileRead =  "/Users/Fearman/Library/Preferences/Autodesk/maya/2011-x64/scripts/proj01_antiAlisaing.txt",updateField= totalGrades.queryAnti())
    section01 = antiAlising.create()
    
    # second intance of Section for Composition / Focal Lenght
    compFocalLenght = sal.Section( name = 'Comp/Focal Length', layout = mainLayout , updateCommand = totalGrades,
                                  fileRead =  "/Users/Fearman/Library/Preferences/Autodesk/maya/2011-x64/scripts/proj01_compFocal.txt", updateField = totalGrades.queryComp(), control=section01)
    section02 = compFocalLenght.create()
    
    # first intance of Section for proffesionalism
    prof = sal.Section( name = 'Professionalism', layout = mainLayout , updateCommand = totalGrades,
                       fileRead = "/Users/Fearman/Library/Preferences/Autodesk/maya/2011-x64/scripts/proj01_prof.txt", updateField = totalGrades.queryPro(), control=section02)
    section03 = prof.create()
    
    myWin.show()
コード例 #3
0
ファイル: sal_proj01.py プロジェクト: zhuo2015/fs-tech-artist
def gui(dir_path):
    if(pm.window(win, ex = True)):
        pm.deleteUI(win)
        
    if(pm.windowPref(win, ex = True)):
        pm.windowPref(win, remove = True)
    
    myWin = pm.window(win, title='sal_testing' , sizeable = True, mnb = True, width = 480, height = 900, backgroundColor= [.68,.68,.68])
    pm.scrollLayout()
    main01 = pm.columnLayout( adjustableColumn=True )
    main02 = pm.columnLayout( adjustableColumn=True )
    global antiAlising, compFocalLenght, prof
    pm.setParent(main02)
    # file info section
    
    
    
    pm.setParent(main02)
    
    infoColumn = pm.columnLayout(adjustableColumn=True)
    global fileInfo
    
    pm.setParent(main02)
     # grade total section
    infoFrame = pm.columnLayout(adjustableColumn=True)
    #infoLayout = pm.formLayout()
    # isntancing the total grade section
    global totalGrades
    totalGrades = sal.Total_Grades()
    totalGrades.create()
    
    #pm.setParent(infoFrame)
    pm.button( label = 'Output Grade and Comment' , command = checkWeighting)
    
    pm.setParent(main02)
    #pm.frameLayout( label = 'Grade', cll = True, cl = True , borderStyle = 'etchedIn', w = 480 )
    #mainLayout = pm.formLayout()
   
    # grading / commenting section
    # first intance of Section for antiAliasing / Noise Quality
    grading = pm.frameLayout( label= 'Grading', cll = True, cl = True , borderStyle = 'etchedIn', w = 480)
    pm.setParent(grading)
    antiAlising = sal.Grading_Section( name = 'Anitalias/Noise Qual', fileName =  r"%s/Comments/proj01_antiAlisaing.txt" % dir_path,
                                      field = totalGrades.queryAnti(), toUpdate = totalGrades)
    section01 = antiAlising.create()
    
    pm.setParent(grading)
    # second intance of Section for Composition / Focal Lenght
    compFocalLenght = sal.Grading_Section( name = 'Comp/Focal Length', fileName = r"%s/Comments/proj01_compFocal.txt" % dir_path,
                                          field = totalGrades.queryComp(), toUpdate = totalGrades)
    section02 = compFocalLenght.create()
    
    pm.setParent(grading)
    prof = sal.Grading_Prof( name = 'Professionalism', fileName = r"%s/Comments/proj01_prof.txt" % (dir_path),
                            field = totalGrades.queryPro(), fileStart = r"%s/Startup/proj01_start.db" % (dir_path), toUpdate = totalGrades)
    prof.create()
    # first intance of Section for proffesionalism
    #prof = sal.Checker( fileName= r"/Users/Fearman/Desktop/sal_package/Sartup/proj01_start")
    #section03 = prof.create()
    
    
    pm.setParent(infoColumn)
    fileInfo = sal.Images(prof)
    
    
    
    myWin.show()