/export-scene-macro

Revamped Paraview Export Scene Macro for vtk.js

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

VTK.js - Paraview Export Scene Macro

Sparked by some missing features in the *.vtkjs export of Paraview, see discussion in the Paraview Discourse Support Channel, the script export-scene-macro.py in this repository tries to fix some of the original script. Starting from a verbatim copy of export-scene-macro.py in the vtk.js github repository, the following changes and fixes have been applied:

  • Fix errors (Python 3 compatibility, name of imported modules)
  • Do not ignore vtkMultiBlockDataset when exporting
  • Export all numeric arrays instead only the one needed for coloring the scene items
  • Do not skip vtkStringArray when exporting to *.vtkjs
  • Fixed export when names of scene items contain spaces or other special characters
  • Support for coloring of scene items by non-numeric arrays (tested with string arrays)
  • Python-style formatting