简体   繁体   English

如何使用python脚本在Paraview中按场景创建动画场景

[英]How can i create an animation scene by scene in paraview using python script

Good evening, I have a series of vtk files. 晚上好,我有一系列的vtk文件。 I wrote a script that performs a specific rotation of those files and then using animationScene1.GoToNext() goes to the next scene, a new rotation is performed etc How can i also add the newly created scene to an video format output? 我编写了一个脚本,对这些文件进行特定的旋转,然后使用animationScene1.GoToNext()转到下一个场景,执行新的旋转等。如何将新创建的场景添加到视频格式输出中? In short, i want every time the script jumps to a new scene and rotation to save the old one and in the end have a video with the correct rotation per scene Thank you very much for your time 简而言之,我希望每次脚本跳到一个新场景并轮换保存旧的场景时,最后要制作一个视频,每个场景具有正确的轮换,非常感谢您的宝贵时间

Since you are moving the camera to specific position using a python script, the easiest way will be to save the images yourself in your script using 由于您是使用python脚本将摄像机移动到特定位置,因此最简单的方法是使用以下命令将图像保存到脚本中

SaveScreenshot("path/to/your/imageN.png")

And then reconstruct a video from all the images. 然后从所有图像重建视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从脚本将动画嵌入到ParaView场景中? - How to embed animation into ParaView scene from script? 如何使用python将3D vtk渲染的场景导出到paraview? - How to export a 3D vtk rendered scene to paraview using python? 如何使用python脚本生成等值面并将场景导出到Paraview中的* .vrml文件中? - How to use python script to generate iso-surface and export scene to *.vrml file in Paraview? 如何使用 manim 从非场景 class 播放 animation? - How can I play an animation from a non-Scene class using manim? 在 Paraview (python) 中,空场景上的 ExportView 导出带有两个对象的 a.vtp - In Paraview (python), ExportView on an empty scene exports a .vtp with two objects Python Mayavi:如何隐藏场景窗口? - Python Mayavi: How can I hide the scene window? 如何使用 python 在我的 maya 场景中实现 LRU 缓存? - How can I implement LRU cache in my maya scene using python? 如何使用NLTK或stanfordcorenlp等python包提取句子中的场景/地点单词? - How can I extract scene/place words in a sentence by using python packages like NLTK or stanfordcorenlp? 在 ParaView 中通过 Python 脚本保存动画 - Save Animation via Python Script in ParaView 如何从 Python 脚本在 Paraview 中创建交互式窗口? - How to create interactive window in Paraview from Python script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM