Skip to content

Control Scalar Array not working properly #496

Answered by oscarBarEs
oscarBarEs asked this question in General
Discussion options

You must be logged in to vote

okey, I discovered what it was needed.
You also need to update the mesh:

@state.change("scalars")
def set_scalars(scalars=mesh.active_scalars_name, **kwargs):
    actor.mapper.array_name = scalars
    mesh.set_active_scalars(scalars)   ## Update at the mesh
    actor.mapper.scalar_range = mesh.get_data_range(scalars)
    print(scalars, mesh.get_data_range(scalars))
    ctrl.view_update()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oscarBarEs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant