Hello!!!,
I’m using VTK9.4 and Python 3.12.
I have a vtkPartitionedDataSetCollection
and I’m trying to display some of the blocks in constant colors and others using scalar point field data.
I was hoping to achieve this using a vtkCompositeDataDisplayAttributes
since I’m already using this for visibility, block color etc. So my vtkCompositeDataDisplayAttributes
instance does this for the blocks thta I want to color by scalar
display_attributes.RemoveBlockColor(dset)
display_attributes.SetBlockArrayName(dset, 'ScalarsX')
display_attributes.SetBlockScalarVisibility(dset, True)
But this yields no scalar based coloring
The only way that I can actually display scalars is to set the active scalar on the dataset associated with the block - poly.GetPointData().SetActiveScalars('ScalarsX')
So my question is - should I be able to enable/disable scalar based coloring of blocks in a vtkPartitionedDataSetCollection using vtkCompositeDataDisplayAttributes
or not?
If so, guidance on how to do this would be apreciated.
If not - what is the purpose of the SetBlockArrayName() method?
I’ve attached some example code that demonstrates the above.
Thanks in advance for any help,
Edit : Example updated with corrections and now rns as expected
Doug
test_pdsc_display_attributes.py (5.2 KB)