[Paraview] RescaleTransferFunctionToDataRange Doesn't Seem to Work in Python Script

Jamison, Ryan Dale rdjamis at sandia.gov
Thu Apr 6 19:22:11 EDT 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 45095 bytes
Desc: image.png
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0001.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: script.py
Type: text/x-python-script
Size: 3415 bytes
Desc: script.py
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0004.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concentric_cylinders.e
Type: application/octet-stream
Size: 151508 bytes
Desc: concentric_cylinders.e
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170406/858477bf/attachment-0005.htm>


More information about the ParaView mailing list