Skip to content

Conversation

@sankhesh
Copy link
Collaborator

@sankhesh sankhesh commented Nov 3, 2025

This change fixes an issue where setting different attributes after initializing the dataset causes the active attributes to be retained from previous dataset state.

Context

When dynamically changing TubeFilter properties at runtime, tubes with colormaps lose their colors and render as solid.

Steps to Reproduce

  1. Open the official TubeFilter example: https://kitware.github.io/vtk-js/examples/TubeFilter.html
  2. Observe the initial tubes with proper colormap (red and yellow tubes) ✅
  3. Modify any tube property using the controls (Number of Sides, Radius, etc.) ❌
  4. Bug: Tubes lose their colors and become solid white/gray
image

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

@sankhesh sankhesh requested a review from finetjul November 3, 2025 02:54
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Did you check that your dataset does not get bigger and bigger because new arrays get added without being removed when properties are changed ?

This change fixes an issue where setting different attributes after
initializing the dataset causes the active attributes to be retained
from previous dataset state.
@sankhesh
Copy link
Collaborator Author

LGTM. Did you check that your dataset does not get bigger and bigger because new arrays get added without being removed when properties are changed ?

Yes, tested by checking number of point attribute arrays after changing multiple properties on the TubeFilter example. The number of arrays remained the same.

@sankhesh sankhesh added this pull request to the merge queue Dec 15, 2025
Merged via the queue into Kitware:master with commit 21037fc Dec 15, 2025
2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 34.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Automated label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants