#============================================================================== # # Project: SharpImage # Module: ClearPaths.py # Language: IronPython # Author: Dan Mueller # Date: $Date$ # Revision: $Revision$ # # Copyright (c) Queensland University of Technology (QUT) 2007. # All rights reserved. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the above copyright notices for more information. # #============================================================================== # Import the relevent class import Script from Script import * class ClearPathsScript(ScriptObject): # ------------------------------------------------------------------------- Name = "ClearPaths" Help = """Clears all paths from the input Renderer.""" Parameters = """None""" Renderer = None Input = None # ------------------------------------------------------------------------- def Initialise(self): """ Initialise the environment for running this script. """ """ NOTE: This function is invoked on the main UI thread. """ ScriptObject.Initialise( self ) self.Renderer = self.ParentApplication.CurrentRenderer self.Input = self.Renderer.Inputs[0] self.ParentApplication.SetApplicationAsReady( 0 ) def DoWork(self): """ Perform the main functions of the script. """ """ NOTE: This function is invoked on the main UI thread. """ self.Renderer.ClearPaths( ) self.Renderer.Focus( ) def Finalise(self): """ Finalise the environment after running this script. """ """ NOTE: This function is invoked on the main UI thread. """ self.ParentApplication.SetApplicationAsReady( 0 ) self.Handlers["ScriptFinalised"]()