命令行参数

到目前为止,CLI 中最常用的命令是命令render 用于将场景渲染到输出文件。 它与以下参数一起使用:

Manim Community v0.19.0

Usage: manim render [OPTIONS] FILE [SCENE_NAMES]...

  Render SCENE(S) from the input FILE.

  FILE is the file path of the script or a config file.

  SCENES is an optional list of scenes in the file.

但是,由于 Manim 默认使用 render 命令,因此每当没有命令时 ,则以下形式更常见,可以改用:

manim [OPTIONS] FILE [SCENES]

使用上述表单的一个示例是:

manim -qm file.py SceneOne

这会要求 Manim 搜索一个SceneOnefile.py文件,并以中等质量(由标志-qm指定)渲染它。

另一个常用的标志是 (“preview”),它使 manim 完成渲染后打开渲染的视频。-p

Last updated