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)
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)
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()
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()