Example #1
0
menu.template_mask = mask = [("Oblivion Files","*.esm"), ("Oblivion Files","*.esp")]
#menu.target_mask = mask = [("nif files","*.nif"), ("tri files","*.tri")]

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),\
# 
#     'template_mesh' : uiRadio(option_frame, 'Template Mesh',['Edges Only','Exclude Edges','All'], column = 0, columnspan = 1, row = 1, rowspan = 4, default = 'Exclude Edges', pack = True),\
#     #'target_mesh' : uiRadio(right_frame, 'Target Mesh',['Edges Only','Exclude Edges','All'], column = 0, columnspan = 1, row = 5, rowspan = 4, default = 'Edges Only'),\
#     
#     '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()
except: menu.end = True

def Main():
    
#     if not path.exists(current_settings['destination']):
#         print ('destination', current_settings['destination'])
#         makedirs(current_settings['destination'])
Example #2
0
{'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()
except: menu.end = True

def Main():
    
    if not path.exists(current_settings['destination']):