Commit cda24cdf authored by Andrew Bauer's avatar Andrew Bauer

Fix for transfer function getting automatically rescaled when it shouldn't

When running Catalyst and the user has specified a range for the lookup
table and then adds in other filters like a Calculator filter this was
causing the lookup table range to get rescaled even though it should
not have been getting rescaled.

Fixes #18373.
parent 3bef9137
......@@ -31,6 +31,7 @@
#include "vtkSMSourceProxy.h"
#include "vtkSMTrace.h"
#include "vtkSMTransferFunctionManager.h"
#include "vtkSMTransferFunctionProxy.h"
#include "vtkSMUtilities.h"
#include "vtkSMViewLayoutProxy.h"
#include "vtkSMViewProxy.h"
......@@ -331,10 +332,14 @@ bool vtkSMParaViewPipelineControllerWithRendering::RegisterRepresentationProxy(v
if (vtkSMProperty* lutProperty = proxy->GetProperty("LookupTable"))
vtkSMProxy* lutProxy =
mgr->GetColorTransferFunction(arrayName, proxy->GetSessionProxyManager());
vtkSMTransferFunctionProxy* lutProxy = vtkSMTransferFunctionProxy::SafeDownCast(
mgr->GetColorTransferFunction(arrayName, proxy->GetSessionProxyManager()));
int rescaleMode =
vtkSMPropertyHelper(lutProxy, "AutomaticRescaleRangeMode", true).GetAsInt();
vtkSMPVRepresentationProxy::RescaleTransferFunctionToDataRange(proxy, true);
bool extend = rescaleMode == vtkSMTransferFunctionManager::GROW_ON_APPLY;
bool force = false;
vtkSMPVRepresentationProxy::RescaleTransferFunctionToDataRange(proxy, extend, force);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment