Exemplo n.º 1
0
def check_string_subtypes(subtype, param_name, label):
    if subtype is not "":
        if "asset" == subtype:
            directory = mangle_path("wc:export/assets") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "texture" == subtype:
            directory = mangle_path("wc:export/textures") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "shader" == subtype:
            directory = mangle_path("wc:export/shader") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "file" == subtype:
            directory = mangle_path("wc:")
            element = pg.wxFileProperty(param_name, label, directory)
        elif "directory" == subtype:
            directory = mangle_path("home:")
            element = pg.wxDirProperty(param_name, label, directory)
        elif "entityobject" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '')
            dlg = browser.create_dialog(True, "/sys/nobject/nentityobject")
            element.SetCallBackDialog(dlg)
        elif "nroot" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '')
            dlg = browser.create_dialog(True, "/")
            element.SetCallBackDialog(dlg)
        elif "entityclass" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '')
            dlg = grimoire.create_dialog(True)
            element.SetCallBackDialog(dlg)
        elif "nobjectclass" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '')
            dlg = entitybrowser.create_dialog(self)
            element.SetCallBackDialog(dlg)
    else:
        # No subtype
        element = pg.wxStringProperty(param_name, label, '')

    return element
Exemplo n.º 2
0
def check_string_subtypes(subtype, param_name, label):
    if subtype is not "":
        if "asset" == subtype:
            directory = mangle_path("wc:export/assets") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "texture" == subtype:
            directory = mangle_path("wc:export/textures") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "shader" == subtype:
            directory = mangle_path("wc:export/shader") + "\\"
            element = pg.wxFileProperty(param_name, label, directory)
        elif "file" == subtype:
            directory = mangle_path("wc:")
            element = pg.wxFileProperty(param_name, label, directory)
        elif "directory" == subtype:
            directory = mangle_path("home:")
            element = pg.wxDirProperty(param_name, label, directory)
        elif "entityobject" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '' )
            dlg = browser.create_dialog(True, "/sys/nobject/nentityobject")
            element.SetCallBackDialog(dlg)
        elif "nroot" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '' )
            dlg = browser.create_dialog(True, "/")                            
            element.SetCallBackDialog(dlg)
        elif "entityclass" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '' )
            dlg = grimoire.create_dialog(True)                            
            element.SetCallBackDialog(dlg)
        elif "nobjectclass" == subtype:
            element = pg.wxStringCallBackProperty(param_name, label, '' )
            dlg = entitybrowser.create_dialog(self)
            element.SetCallBackDialog(dlg)
    else:
        # No subtype
        element = pg.wxStringProperty(param_name, label, '')

    return element
Exemplo n.º 3
0
 def __get_subtype_property(self, subtype, name, label):
     if "asset" == subtype:
         directory = servers.get_file_server().manglepath("wc:export/assets") + "\\"
         prop = pg.wxFileProperty(name, label, directory)
     elif "texture" == subtype:
         directory = servers.get_file_server().manglepath("wc:export/textures") + "\\"
         prop = pg.wxFileProperty(name, label, directory)
     elif "image" == subtype:
         directory = servers.get_file_server().manglepath("wc:export/textures") + "\\"
         prop = pg.wxAdvImageFileProperty(name, label)
     elif "shader" == subtype:
         directory = servers.get_file_server().manglepath("wc:export/shader") + "\\"
         prop = pg.wxFileProperty(name, label, directory)
     elif "file" == subtype:
         directory = servers.get_file_server().manglepath("wc:")
         prop = pg.wxFileProperty(name, label, directory)
     elif "material" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '')
         dlg = nodelibdlg.NodeLibDialog( self, nodelibdlg.SELECT,
             'material', 'Material', "/usr/materials")
         prop.SetCallBackDialog(dlg)
     elif "directory" == subtype:
         directory = servers.get_file_server().manglepath("home:")
         prop = pg.wxDirProperty(name, label, directory)
     elif "entityobjectclass" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = objbrowserwindow.create_dialog(
                     self, 
                     True, 
                     "/sys/nobject/nentityobject"
                     )
         prop.SetCallBackDialog(dlg)
         prop = pg.wxStringProperty(name, label, '')
     elif "nroot" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = objbrowserwindow.create_dialog(
                     self, 
                     True, 
                     "/"
                     )
         prop.SetCallBackDialog(dlg)
     elif "entityclass" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = grimoire.create_dialog(self, True)
         prop.SetCallBackDialog(dlg)
     elif "entityobject" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = entitybrowser.create_dialog(self)
         prop.SetCallBackDialog(dlg)
     elif "musicsample" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = musictabledlg.dialog_for_music_sample_selection(self)
         prop.SetCallBackDialog(dlg)
     elif "musicmood" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = musictabledlg.dialog_for_music_mood_selection(self)
         prop.SetCallBackDialog(dlg)
     elif "musicstyle" == subtype:
         prop = pg.wxStringCallBackProperty(name, label, '' )
         dlg = musictabledlg.dialog_for_music_style_selection(self)
         prop.SetCallBackDialog(dlg)
     else:
         print "Bad subtype"
         prop = pg.wxStringProperty(name, label, '')
 
     return prop