예제 #1
0
  {"Select Female Template..." : {'command': menu.OpenFemaleTemplate}},\
  {"Select Male Template..." : {'command': menu.OpenMaleTemplate}},\
  {"Select Neutral Template..." : {'command': menu.OpenNeutralTemplate}},\
  {"Select Destination Folder..." : {'command': menu.SelectDestinationFolder}},\
  ]},\
{'Help': [\
  {"About" : {'command': menu.About}}]}\
]

file_menu = constructMenu(menu, menu_structure, menu.menu_values)

menu.template_mask = mask = [("nif files","*.nif")]
menu.target_mask = mask = [("nif files","*.nif"), ("tri files","*.tri")]

menu.load_buttons({\
    'template_mesh' : uiRadio(option_frame_1, 'Template Mesh',['Edges Only','Exclude Edges','All'], column = 0, columnspan = 1, row = 1, rowspan = 4, default = 'Edges Only', pack = True),\
    'female': uiToggle(option_frame_2, 'Female Template', 'GRID', column = 0, columnspan = 1, row = 0, default = True),\
    'male': uiToggle(option_frame_2, 'Male Template', 'GRID', column = 0, columnspan = 1, row = 1, default = True),\
    'neutral': uiToggle(option_frame_2, 'Neutral Template', 'GRID', column = 0, columnspan = 1, row = 2, default = True),\
    #'gender' : uiRadio(option_frame_2, 'Templates',['Female Only','Male Only','Both', 'Neither'], column = 1, columnspan = 1, row = 1, rowspan = 4, default = 'Both', pack = True),\
    'save': uiButton(utility_frame, 'Save Current Settings', 'GRID', column = 0, columnspan = 1, row = 9, buttonFunction = menu.save),\
    'load': uiButton(utility_frame, 'Load Settings', 'GRID', column = 2, columnspan = 1, row = 9, buttonFunction = menu.load),\
    'default': uiButton(utility_frame, 'Load Defaults', 'GRID', column = 1, columnspan = 1, row = 9, buttonFunction = menu.applyDefaultSettings),\
    'cancel': uiButton(utility_frame, 'Cancel', 'GRID', column = 0, columnspan = 1, row = 10, buttonFunction = menu.cancel),\
    'ok': uiButton(utility_frame, 'OK', 'GRID', column = 2, columnspan = 1, row = 10, buttonFunction = menu.ok, sticky = 'E'),\
})

current_settings = menu.openMenu()
print(current_settings)

try: menu.destroy()
예제 #2
0
file_menu = constructMenu(menu, menu_structure, menu.menu_values)

menu.template_mask = mask = [("nif files","*.nif"), ("pkg files","*.pkg")]
menu.target_mask = mask = [("nif files","*.nif"), ("tri files","*.tri"), ("all", "*.*")]

menu.load_buttons({\
    'loc': uiToggle(left_frame, 'Location', 'GRID', column = 0, columnspan = 1, row = 0, default = True),\
    'norm': uiToggle(left_frame, 'Normal Vector', 'GRID', column = 0, columnspan = 1, row = 1, default = True),\
    'bone': uiToggle(left_frame, 'Bone Weights', 'GRID', column = 0, columnspan = 1, row = 2, default = True),\
    #'skin': uiToggle(menu, 'Copy Skin Only', 'GRID', column = 0, columnspan = 1, row = 2, default = True),\
#     'uv': uiToggle(menu, 'UV Coordinates', 'GRID', column = 0, columnspan = 1, row = 3, default = False),\
    'Targets' : uiComboSlider(center_frame, 'Vertex Targets', from_ = 1, to = 100, resolution = 1, tickinterval = 1, arrange = 'GRID', col = 0, colspan = 1, row = 1, default = 1),\
    'Distance' : uiComboSlider(center_frame, 'Search Distance', from_ = 0.0, to = 100.0, resolution = .1, tickinterval = .1, arrange = 'GRID', col = 0, colspan = 1, row = 4, default = 0.1),\
    #'template mesh' : uiRadio(menu.frame, 'Template Mesh\nVertex Options',['Edges Only','Exclude Edges','All'], column = 2, columnspan = 1, row = 0, default = 'Exclude Edges'),\
    'label': uiLabel(right_frame, 'Vertex Options', 'GRID', column = 0, columnspan = 1, row = 0),\
    'template_mesh' : uiRadio(right_frame, 'Template Mesh',['Edges Only','Exclude Edges','All'], column = 0, columnspan = 1, row = 1, rowspan = 4, default = 'Edges Only'),\
    'target_mesh' : uiRadio(right_frame, 'Target Mesh',['Edges Only','Exclude Edges','All'], column = 0, columnspan = 1, row = 5, rowspan = 4, default = 'Edges Only'),\
    'gender' : uiRadio(far_right_frame, 'gender',['Female Only','Male Only','Both'], column = 1, columnspan = 1, row = 1, rowspan = 4, default = 'Both', pack = True),\


    'skin': uiToggle(option_frame, 'Copy Skin Only', 'GRID', column = 0, columnspan = 1, row = 0, default = False),\
    'doubles': uiToggle(option_frame, 'Mend Doubles', 'GRID', column = 1, columnspan = 1, row = 0, default = True),\
    'pseudo_doubles': uiToggle(option_frame, 'Mend Pseudo-Doubles', 'GRID', column = 1, columnspan = 1, row = 1, default = False),\
    'tri': uiToggle(option_frame, 'Mend Tri Files', 'GRID', column = 2, columnspan = 1, row = 0, default = True),\
    
    'save': uiButton(utility_frame, 'Save Current Settings', 'GRID', column = 0, columnspan = 1, row = 9, buttonFunction = menu.save),\
    'load': uiButton(utility_frame, 'Load Settings', 'GRID', column = 2, columnspan = 1, row = 9, buttonFunction = menu.load),\
    'default': uiButton(utility_frame, 'Load Defaults', 'GRID', column = 1, columnspan = 1, row = 9, buttonFunction = menu.applyDefaultSettings),\
    'cancel': uiButton(utility_frame, 'Cancel', 'GRID', column = 0, columnspan = 1, row = 10, buttonFunction = menu.cancel),\
    'ok': uiButton(utility_frame, 'OK', 'GRID', column = 2, columnspan = 1, row = 10, buttonFunction = menu.ok, sticky = 'E'),\