Indeed you cannot use vtkSMAnimationSceneWebWriter
if you want to only depend on VTK.
This is vtkSMAnimationSceneWebWriter
algorithm :
- create a place-holder
index.json
at the root of a folder with all necessary keys, - for each timestep:
- use the
vtkJSONSceneExporter
class to export each frame in its own folder, at the same level ofindex.json
- add the current timestep time to the root
index.json
(see index.json below)
- use the
- at this point we have a folder, let’s say
/home/user/somewhere/
, containing :- index.json
- scene_timestep1/
- scene_timestep2/
- […]
- call
zipAllTimeSteps('/home/user/somewhere/myFinalExport.vtkjs')
. After that/home/user/somewhere/
will only containmyFinalExport.vtkjs
.
If you wish to reimplement this algorithm you can pretty much copy paste the zipAllTimeSteps
function (keep in mind the license though ) and reimplement
vtkSMAnimationSceneWebWriter
algorithm.