示例#1
0
 def __post_grass_import_process(self):
     # Close and reopen the grass material list dialog
     child_data = []
     for child in self.get_frame().GetChildren():
         if isinstance(child, (grassmaterials.GrassMaterialsDialog)):
             data = levelcmds.persist_window(child)
             if data is not None:
                 child_data.append(data)
             child.Close()
     for data in child_data:
         levelcmds.restore_window(data)
示例#2
0
 def __post_grass_import_process(self):
     # Close and reopen the grass material list dialog
     child_data = []
     for child in self.get_frame().GetChildren():
         if isinstance(
             child, 
             (grassmaterials.GrassMaterialsDialog)
             ):
             data = levelcmds.persist_window(child)
             if data is not None:
                 child_data.append(data)
             child.Close()
     for data in child_data:
         levelcmds.restore_window(data)
示例#3
0
    def __postterrain_process(self):
        # Set the new outdoor in the terrain state
        if app.get_current_state() == 'terrain':
            trn.get_terrain_module().setoutdoor(app.get_outdoor_obj())
        # Close and reopen the terrain editors dialogs
        children_data = []
        for child in self.get_frame().GetChildren():
            if isinstance(
                    child,
                (trntoolpanel.ToolDialog, trnlayersdlg.LayerManagerDialog)):
                data = levelcmds.persist_window(child)
                if data is not None:
                    children_data.append(data)
                child.Close()
        for data in children_data:
            levelcmds.restore_window(data)

        # Refresh terrain menu
        self.get_frame().get_menubar().get_menu('&Terrain').refresh()
示例#4
0
    def __postterrain_process(self):
        # Set the new outdoor in the terrain state
        if app.get_current_state() == 'terrain':
            trn.get_terrain_module().setoutdoor( app.get_outdoor_obj() )
        # Close and reopen the terrain editors dialogs
        children_data = []
        for child in self.get_frame().GetChildren():
            if isinstance(
                child, 
                (trntoolpanel.ToolDialog, trnlayersdlg.LayerManagerDialog)
                ):
                data = levelcmds.persist_window(child)
                if data is not None:
                    children_data.append(data)
                child.Close()
        for data in children_data:
            levelcmds.restore_window(data)

        # Refresh terrain menu
        self.get_frame().get_menubar().get_menu('&Terrain').refresh()