Hello,

I have the following macro which creates a ProgrammableSource in ParaView. I'm wondering why the script seems to be called three separate times:

        script = """
        import time
        print 'Script was called.',
        print time.strftime('%H:%M:%S')+'.%03d'%(time.time()%1.0*1000)
        self.GetImageDataOutput().SetDimensions(100,100,1)
        # ... do something expensive here ...
        """
        script_request_information = """
        from paraview import util
        util.SetOutputWholeExtent(self, [0, 100, 0, 100, 0, 0])
        """
        ps = ProgrammableSource(
                OutputDataSetType='vtkImageData',
                Script=script,
                ScriptRequestInformation=script_request_information)
        GetDisplayProperties(ps).Visibility = 1
        Render()

It prints out once when I turn on visibility and two more times when I Render(). How can I keep the script from running more than once?

Thanks!

--
Hal Canary
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to