I have an automated clip script which i run and as a part of it I would like to have and option to rescale the colour scheme to visible data in range - boolean.
I have found this command clipDisplay.SetScalarBarVisibility(renderView1, True)
in the Paraview User Guide (Chapter 10.1.2) and placed at the end of Colour Transfer function within paraview tracked script for the clip.
Running script doesn't give any error but just doesn't do the job of rescaling the colour scheme when compared to same operation done in GUI.
I want to use the code universally, so manually selecting the data in range with number definition is out of the question...
edit
Using trace you'd get:
# trace generated using paraview version 5.7.0
#
# To ensure correct image size when batch processing, please search
# for and uncomment the line `# renderView*.ViewSize = [*,*]`
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# get color transfer function/color map for 'p'
pLUT = GetColorTransferFunction('p')
pLUT.AutomaticRescaleRangeMode = "Grow and update on 'Apply'"
pLUT.InterpretValuesAsCategories = 0
pLUT.AnnotationsInitialized = 0
pLUT.ShowCategoricalColorsinDataRangeOnly = 0
pLUT.RescaleOnVisibilityChange = 0
pLUT.EnableOpacityMapping = 0
pLUT.RGBPoints = [-714.7062377929688, 0.231373, 0.298039, 0.752941, -259.51192474365234, 0.865003, 0.865003, 0.865003, 195.68238830566406, 0.705882, 0.0156863, 0.14902]
pLUT.UseLogScale = 0
pLUT.ColorSpace = 'Diverging'
pLUT.UseBelowRangeColor = 0
pLUT.BelowRangeColor = [0.0, 0.0, 0.0]
pLUT.UseAboveRangeColor = 0
pLUT.AboveRangeColor = [0.5, 0.5, 0.5]
pLUT.NanColor = [1.0, 1.0, 0.0]
pLUT.NanOpacity = 1.0
pLUT.Discretize = 1
pLUT.NumberOfTableValues = 256
pLUT.ScalarRangeInitialized = 1.0
pLUT.HSVWrap = 0
pLUT.VectorComponent = 0
pLUT.VectorMode = 'Magnitude'
pLUT.AllowDuplicateScalars = 1
pLUT.Annotations = []
pLUT.ActiveAnnotatedValues = []
pLUT.IndexedColors = []
pLUT.IndexedOpacities = []
# Rescale transfer function
pLUT.RescaleTransferFunction(-413.7960510253906, 192.35369873046875)
# get opacity transfer function/opacity map for 'p'
pPWF = GetOpacityTransferFunction('p')
pPWF.Points = [-714.7062377929688, 0.0, 0.5, 0.0, 195.68238830566406, 1.0, 0.5, 0.0]
pPWF.AllowDuplicateScalars = 1
pPWF.UseLogScale = 0
pPWF.ScalarRangeInitialized = 1
# Rescale transfer function
pPWF.RescaleTransferFunction(-413.7960510253906, 192.35369873046875)
Any ideas please? Cheers