DataSetMapper.array_name

Contents

DataSetMapper.array_name#

property DataSetMapper.array_name: str[source]#

Return or set the array name or number and component to color by.

Setter behavior depends on whether the array can be resolved on an upstream dataset without running the pipeline:

  • If _scalar_source_dataset exposes an array with the given name, route through set_active_scalars so a spliced ActiveScalarsAlgorithm activates the array on each RequestData (and _maybe_set_default_scalar_range picks a default clim).

  • Otherwise fall back to the raw VTK SetArrayName. This path is hit when the mapper is wired to a pipeline whose output topology/arrays only materialize after Update(), for example a SmoothShadingAlgorithm producing post-surface scalars. In that case an existing active-scalars algorithm (if any) is updated in place; otherwise name resolution happens on the first render.