Commit d9de7967 authored by Shawn Waldon's avatar Shawn Waldon

AnnotateAttributeData: add support for vectors

Fixes #17973 (or the remaining part of it).
parent ce266f60
......@@ -165,8 +165,7 @@ annotation text.
<DataType value="vtkTable" />
</DataTypeDomain>
<InputArrayDomain attribute_type="any"
name="input_array"
number_of_components="1" />
name="input_array" />
<Documentation>
Set the input of the filter. To avoid the complications/confusion when identifying
elements in a composite dataset, this filter doesn't support composite datasets
......
......@@ -171,7 +171,10 @@ def execute_on_attribute_data(self, evaluate_locally):
return True
array = ns[array_name]
chosen_element = array.GetValue(self.GetElementId())
if array.IsA("vtkStringArray"):
chosen_element = array.GetValue(self.GetElementId())
else:
chosen_element = array[self.GetElementId()]
expression = self.GetPrefix() if self.GetPrefix() else ""
expression += str(chosen_element)
self.SetComputedAnnotationValue(expression)
......
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