At first: thanks for your fast answer!

>> Is there an option to automatically render a slice when it is moved? I 
>> basically don't want to press the Apply-button whenever the slice is moved. 
>> If this isn't possible, how do i "press" the Apply-button with python?
> 
> Yes, go to Edit | Settings. There's a check box for "Auto Accept" on
> the "General" page -- check that. ParaView then auto-apply.

Thanks, thats exactly what I was looking for!

>> I could read the Origin-values from the Properties field of the Object 
>> Inspector and set the Origin-values from the Display field to this values. 
>> But how do I get this Origin-values (I only found the ones from the Display 
>> field in python).
> 
> I am not sure I understand what you are trying to do here.

Nevermind, I don't need this with the solution you provided above.

>> I also need to press the "Rescale to Data Range" button when the slice is 
>> moved. Is this even possible? If so, how?
> 
> Not currently. However, you can always write up a python script that
> achieves the same effect. Let me know if you need help with that.

I guess I have to create a Lookup-Table? It seems that I need the 'scalars' 
values from the 'Information' page of the Object Inspector (Subsection Data 
Arrays). How do I get these?

It seems that I'm having another problem now. After creating the Slice, I set 
the ColorArrayName to 'scalars'. The "Color by" field changes, but the Slice is 
just red and pressing "Rescale to Data Range" doesn't change anything. When I 
manually change it to "Solid Color" and then change it back to "scalars", it 
works fine.

This is the code:

s=Slice()
sdp = GetDisplayProperties(s)
sdp.Input.SliceType.Normal = [0,0,1]
sdp.ColorArrayName = 'scalars'

What am I doing wrong?

Thanks,
   Stefan


_______________________________________________
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