def __init__(self, title='Path:', dialogtype='OpenFolder'):
        self.window = mset.UIWindow(name='', register=False)
        self.window.width = 280
        self.title = mset.UILabel(title)
        self.textField = mset.UITextField()
        self.button = mset.UIButton('....')
        self.button.small = True
        self.dialogtype = dialogtype

        self.draw()
        self.controllers()
 def draw(self):
     self.window.clearElements()
     self.mapListDict.clear()
     self.window.addElement(self.affixlist.listBox)
     self.window.addSpace(60)
     self.window.addElement(self.extlist.listBox)
     self.window.addReturn()
     ### create map list field
     for text in self.mapList:
         if text not in self.mapListDict:
             newLabel = mset.UILabel(text)
             newField = mset.UITextField()
             newField.width = 160
             if self.affixlist.listBox.selectedItem == 0:
                 newField.value = ('_' + text)
             elif self.affixlist.listBox.selectedItem == 1:
                 newField.value = ('_' + text + '_')
             elif self.affixlist.listBox.selectedItem == 2:
                 newField.value = (text + '_')
             self.window.addElement(newLabel)
             self.window.addStretchSpace()
             self.mapListDict[text] = newField
             self.window.addElement(newField)
             self.window.addReturn()
    cache = UPROJECT(folder_line.value)
    u_mats = cache.materials

    for i in u_mats:
        checkbox = mset.UICheckBox()
        checkbox.label = i.name
        checks_list.append(checkbox)
        scrollbox_window.addReturn()
        scrollbox_window.addElement(checkbox)


def select_folder():
    folder_line.value = mset.showOpenFolderDialog()


folder_line = mset.UITextField()
folder_line.value = ''

folder_button = mset.UIButton()
folder_button.onClick = select_folder
folder_button.setIcon(
    os.path.abspath(
        os.path.join(os.curdir, "data/gui/control/materialgroupnew.tga")))

button_all = mset.UIButton()
button_all.onClick = select_all
button_all.text = 'All'

button_none = mset.UIButton()
button_none.onClick = deselcet_all
button_none.text = 'None'
Exemple #4
0
## ui
window = mset.UIWindow("mar.pipe v.01")

#project_settings

settings_drawer_ui = mset.UIDrawer(name="Settings")
settings_drawer = mset.UIWindow(name="", register=False)
settings_drawer_ui.containedControl = settings_drawer
window.addElement(settings_drawer_ui)

#project dir
settings_drawer.addElement(mset.UILabel("project"))
file_button = mset.UIButton("...")
file_button.onClick = get_project_folder
settings_drawer.addElement(file_button)
project_folder_field = mset.UITextField()
project_folder_field.value = project_dir
settings_drawer.addElement(project_folder_field)

#material_dir
settings_drawer.addReturn()
settings_drawer.addElement(mset.UILabel("materials"))
file_button = mset.UIButton("...")
file_button.onClick = get_material_folder
settings_drawer.addElement(file_button)
material_folder_field = mset.UITextField()
material_folder_field.value = material_dir
settings_drawer.addElement(material_folder_field)

#model_dir
settings_drawer.addReturn()
Exemple #5
0
import mset, os, re

defaultLowPolyPath = 'D:\\bake\\low\\'
defaultHighPolyPath = 'D:\\bake\\high\\'

win = mset.UIWindow()
win.title = 'EGC_Bake_AutoGroup'
infolabel = mset.UILabel()
infolabel.text = 'Hipoly name: *_hi.FBX(OBJ)\tLowpoly name: *.FBX'
hilabel = mset.UILabel()
hilabel.text = "HiPoly folder:"
hifolder = mset.UITextField()
hifolder.value = defaultHighPolyPath
lowlabel = mset.UILabel()
lowlabel.text = "LowPoly folder:"
lowfolder = mset.UITextField()
lowfolder.value = defaultLowPolyPath
list = mset.UIListBox()
list.title = 'Himesh Set'
list.addItem('FBX')
list.addItem('OBJ')
list.selectedItem = 0  #selected FBX first
rotationlabel = mset.UILabel()
rotationlabel.text = "Rotation:"
rotationX = mset.UITextFieldFloat()
rotationX.width = 35
rotationY = mset.UITextFieldFloat()
rotationY.width = 35
rotationZ = mset.UITextFieldFloat()
rotationZ.width = 35
rotationX.value = -90