Utkarsh, Thanks for the info! UpdatePipeline() did the trick! The script is now working like expected!
Best, Ryan On Apr 6, 2017, at 9:31 PM, Utkarsh Ayachit <utkarsh.ayac...@kitware.com<mailto:utkarsh.ayac...@kitware.com>> wrote: Ryan, Try this: before calling RescaleTransferFunctionToDataRange, call UpdatePipeline() or UpdatePipeline(proxy=concentric_cylinderse). As you change properties on the reader, the reader won't rexecute/update until the data is rendered on UpdatePipeline is called. Unless the reader updates, you won't have updated array ranges etc. As a result when you call RescaleTransferFunctionToDataRange which uses current data ranges, it ends up using the ranges from the most resent update -- which probably happened in Show(). Utkarsh On Thu, Apr 6, 2017 at 7:22 PM, Jamison, Ryan Dale <rdja...@sandia.gov<mailto:rdja...@sandia.gov>> wrote: Hello Everyone, I’m trying to use RescaleTransferFunctionToDataRange to scale my data range in a python script. When I run a trace and use the “Rescale to Data Range” button, the trace echoes the RescaleTransferFunctionToDataRange command. When I run that same command fro the Python Shell or when using pvpython, the command doesn’t work (i.e. the range is not changed). Now, if I use the builtin Python Shell and run the commands, nothing happens when the commands are run. But, if I run the commands and then move the model at all, the command then works. It seems to me that though the command was issued, it wasn’t executed until I moved the model. Question is, how do I get this same behavior when I run in batch mode (pvpython)? I’ve attached an example. The image (image.png) produced is in the correct orientation but the max and min values for the stress_xx labels are incorrect. The correct max is 58.07 and the min is -18.85. I’d appreciate any help! This is the command I’m running: /Applications/ParaView.app/Contents/bin/pvpython script.py This example was generated on OS X 10.11.6 using ParaView 5.3.0. I get the same behavior on Linux 5.3.0 too! Thanks, Ryan _______________________________________________ Powered by www.kitware.com<http://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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
_______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview