[Paraview] python support to open ComparativeView ?

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Mar 23 15:27:11 EDT 2010


I've added CreateComparativeRenderView() etc. to simple.py and it gets
traced as well.  However it's going to be a bit of work to get
comparative views working well with tracing since they use some wacky
proxies.

I've added a feature request for that:
http://paraview.org/Bug/view.php?id=10450

However here's a sample python script:

-------------------------------
view = CreateComparativeRenderView()
sp = Sphere()
Show()
view.GetRootView().ResetCamera()
view.StillRender()

parameter_cue = servermanager.animation.ComparativeAnimationCue()
parameter_cue.AnimatedProxy = sp
parameter_cue.AnimatedElement=0
parameter_cue.AnimatedPropertyName = "Radius"

# Look at vtkSMComparativeAnimationCueProxy for available methods.
parameter_cue.UpdateWholeRange(0.1, 0.5)

view.Cues = [parameter_cue]
view.StillRender()
-------------------------------

On Tue, Mar 23, 2010 at 2:59 PM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> Your timing couldn't be more perfect :), I just realized this a while
> ago and was working on it.
>
> Utkarsh
>
> On Tue, Mar 23, 2010 at 2:56 PM, Favre  Jean <jfavre at cscs.ch> wrote:
>> Hi all
>>
>> How does one go about creating a ComparativeView multi-viewport in a python script?
>>
>> I tried the trace thing, but it only gave me an incomplete description, and then it failed, when reloading, on the keywords
>>
>> ComparativeRenderView2.Cues = []
>>
>> I have found in simple.py the definitions for XYChartView, XYBarChartView and the regular RenderView, and I guessed I could do a
>>
>> servermanager._create_view("ComparativeRenderView")
>> then register my proxy, etc, etc.
>>
>> Could we ask the developers to add the correct definition of CreateComparativeRenderView in  simple.py?
>>
>> TIA
>> Jean
>> _______________________________________________
>> 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
>>
>


More information about the ParaView mailing list