<div dir="ltr">Hi, <div><br></div><div>I am using ParaView 4.3.1 on Mac OSX. </div><div>I used to be able to loop through the components of an attribute array and change the color of the representation. I am not sure why this is no longer working (don't recall when it was working, maybe 4.2?). It does work from GUI. This is the GUI trace for changing the color attribute three times:</div><div><pre style="margin-top:12px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#### import the simple module from the paraview</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-weight:600;color:rgb(0,128,0)">from</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';font-weight:600;color:rgb(0,0,255)">paraview.simple</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">*</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#### disable automatic camera reset on 'Show'</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">paraview</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">simple</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">_DisableFirstRenderCameraReset()</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier'"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># get color transfer function/color map for 'SpeedArray'</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> GetColorTransferFunction(</span><span style="font-family:'Courier New,courier';color:rgb(186,33,33)">'SpeedArray'</span><span style="font-family:'Courier New,courier'">)</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">InterpretValuesAsCategories </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">EnableOpacityMapping </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">RGBPoints </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">150.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">UseLogScale </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">LockScalarRange </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">ColorSpace </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(186,33,33)">'HSV'</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">UseBelowRangeColor </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">BelowRangeColor </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">UseAboveRangeColor </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">AboveRangeColor </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">NanColor </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.498039</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.498039</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.498039</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Discretize </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">NumberOfTableValues </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">256</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">ScalarRangeInitialized </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">HSVWrap </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">VectorComponent </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">96</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">VectorMode </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(186,33,33)">'Component'</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">AllowDuplicateScalars </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Annotations </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> []</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">IndexedColors </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> []</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier'"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># get opacity transfer function/opacity map for 'SpeedArray'</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> GetOpacityTransferFunction(</span><span style="font-family:'Courier New,courier';color:rgb(186,33,33)">'SpeedArray'</span><span style="font-family:'Courier New,courier'">)</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Points </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">150.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">AllowDuplicateScalars </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">ScalarRangeInitialized </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier';color:rgb(102,102,102)"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#change array component used for coloring</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">RGBPoints </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">134.079086144</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">VectorComponent </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">111</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier';color:rgb(102,102,102)"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># Properties modified on speedArrayPWF</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Points </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">134.079086144</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier'"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#change array component used for coloring</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">RGBPoints </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">131.302099153</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">VectorComponent </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">127</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier';color:rgb(102,102,102)"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># Properties modified on speedArrayPWF</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Points </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">131.302099153</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier'"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#change array component used for coloring</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">RGBPoints </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">143.468496117</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayLUT</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">VectorComponent </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">175</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier';color:rgb(102,102,102)"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># Properties modified on speedArrayPWF</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">speedArrayPWF</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">.</span><span style="font-family:'Courier New,courier'">Points </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">=</span><span style="font-family:'Courier New,courier'"> [</span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">2.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">143.468496117</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">1.0</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.5</span><span style="font-family:'Courier New,courier'">, </span><span style="font-family:'Courier New,courier';color:rgb(102,102,102)">0.0</span><span style="font-family:'Courier New,courier'">]</span></pre><pre style="margin-top:0px;margin-bottom:0px;font-family:'Courier New,courier'"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)">#### uncomment the following to render all views</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># RenderAllViews()</span></pre><pre style="margin-top:0px;margin-bottom:12px"><span style="font-family:'Courier New,courier';font-style:italic;color:rgb(64,128,128)"># alternatively, if you want to write images, you can use SaveScreenshot(...).</span></pre></div><div><br></div><div>I try to do the same from a script, this time keeping the color map the same (not rescaling), and that does not work, the color of the geometry stays the same:</div><div><br></div><div>###############</div><div><i>speedArrayLUT = GetColorTransferFunction('SpeedArray')<br></i></div><div><div><i>speedArrayLUT.RGBPoints = [0.0, 1.0, 0.0, 0.0, 150.0, 0.0, 0.0, 1.0]</i></div><div><i>speedArrayLUT.LockScalarRange = 1</i></div><div><i>speedArrayLUT.ColorSpace = 'HSV'</i></div><div><i>speedArrayLUT.NanColor = [0.498039, 0.498039, 0.498039]</i></div><div><i>speedArrayLUT.ScalarRangeInitialized = 1.0</i></div><div><i>speedArrayLUT.VectorComponent = 671</i></div><div><i>speedArrayLUT.VectorMode = 'Component'</i></div><div><i><br></i></div><div><i>speedArrayPWF = GetOpacityTransferFunction('SpeedArray')</i><br></div><div><i>speedArrayPWF.Points = [0.0, 0.0, 0.5, 0.0, 150.0, 1.0, 0.5, 0.0]</i></div><div><i>speedArrayPWF.ScalarRangeInitialized = 1</i></div><div><i><br></i></div><div><i>attributesLUTColorBar = GetScalarBar(speedArrayLUT, renderView1)</i></div><div><i>attributesLUTColorBar.Title = 'Speed (km/h)'</i></div><div><i><br></i></div><div><i>for i in range_15min: </i></div><div><i><span class="Apple-tab-span" style="white-space:pre"> </span>speedArrayLUT.VectorComponent = i<br></i></div></div><div><i> Render()</i></div><div>#################</div><div><br></div><div>If I add: </div><div><br></div><div><i>readerDisplay.RescaleTransferFunctionToDataRange() </i></div><div><br></div><div>in the loop, I do see the range of the color bar changing with each iteration, but the color of the rendered geometry does not change. Is there a way to force an update on the readerDisplay (where, <i>readerDisplay = GetDisplayProperties(reader, view=renderView1)</i>)</div><div><br></div><div>Thanks for any suggestions. </div><div><br></div><div>Matei</div><div><br></div><div><br></div><div>
<pre style="margin-top:12px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:12px"></pre></div></div>