Skip to content

Cli reader options #1860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into cli-reader-options
  • Loading branch information
0xfedcafe authored Mar 3, 2025
commit fc68b05319451176a66ab5c8775dfc5234ca0ee3
4 changes: 2 additions & 2 deletions application/F3DOptionsTools.cxx
Original file line number Diff line number Diff line change
@@ -65,8 +65,8 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{ "no-background", "", "No background when render to file", "<bool>", "1" },
{ "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" },
{ "list-readers", "", "Print the list of readers", "", "" },
{"force-reader", "", "Force a specific reader to be used, disrigarding the file extension", "<reader>", "1"},
{ "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "", "" },
{ "force-reader", "", "Force a specific reader to be used, disrigarding the file extension", "<reader>", "1"},
{ "list-bindings", "", "Print the list of interaction bindings and exits, ignored with `--no-render`, only considers the first file group.", "<bool>", "1" },
{ "config", "", "Specify the configuration file to use. absolute/relative path or filename/filestem to search in configuration file locations", "<filePath/filename/fileStem>", "" },
{ "no-config", "", "Do not read the configuration file", "<bool>", "1" },
{ "no-render", "", "Do not render anything and quit right after loading the first file, use with --verbose to recover information about a file.", "<bool>", "1" },
20 changes: 10 additions & 10 deletions doc/libf3d/OPTIONS.md
Original file line number Diff line number Diff line change
@@ -20,16 +20,16 @@ See the [APIs](#APIs) details below for more info.

## Scene Options

Option|Type<br>Default<br>Trigger|Description|F3D option
:---:|:---:|:---|:---:
scene.animation.autoplay|bool<br>false<br>load|Automatically start animation.|\-\-animation-autoplay
scene.animation.index|int<br>0<br>load|Select the animation to load.<br>Any negative value means all animations (glTF only).<br>The default scene always has at most one animation.|\-\-animation-index
scene.animation.speed_factor|ratio<br>1<br>render|Set the animation speed factor to slow, speed up or even invert animation.|\-\-animation-speed-factor
scene.animation.time|double<br>optional<br>load|Set the animation time to load.|\-\-animation-time
scene.camera.index|int<br>optional<br>load|Select the scene camera to use when available in the file.<br>The default scene always uses automatic camera.|\-\-camera-index
scene.force_reader|string<br>optional<br>load|Force a specific reader to be used, disrigarding the file extension.|\-\-force-reader
scene.up_direction|string<br>+Y<br>load|Define the Up direction. It impacts the grid, the axis, the HDRI and the camera.|\-\-up
scene.camera.orthographic|bool<br>optional<br>load|Set to true to force orthographic projection. Model specified by default, which is false if not specified.|\-\-camera\-orthographic
| Option | Type<br>Default<br>Trigger | Description | F3D option |
| :--------------------------: | :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------: |
| scene.animation.autoplay | bool<br>false<br>load | Automatically start animation. | \-\-animation-autoplay |
| scene.animation.index | int<br>0<br>load | Select the animation to load.<br>Any negative value means all animations (glTF only).<br>The default scene always has at most one animation. | \-\-animation-index |
| scene.animation.speed_factor | ratio<br>1<br>render | Set the animation speed factor to slow, speed up or even invert animation. | \-\-animation-speed-factor |
| scene.animation.time | double<br>optional<br>load | Set the animation time to load. | \-\-animation-time |
| scene.camera.index | int<br>optional<br>load | Select the scene camera to use when available in the file.<br>The default scene always uses automatic camera. | \-\-camera-index |
| scene.up_direction | direction<br>+Y<br>load | Define the Up direction. It impacts the grid, the axis, the HDRI and the camera. | \-\-up |
| scene.force_reader | string<br>optional<br>load | Force a specific reader to be used, disrigarding the file extension. | \-\-force-reader |
| scene.camera.orthographic | bool<br>optional<br>load | Set to true to force orthographic projection. Model specified by default, which is false if not specified. | \-\-camera\-orthographic |

## Interactor Options

42 changes: 21 additions & 21 deletions doc/user/OPTIONS.md
Original file line number Diff line number Diff line change
@@ -6,27 +6,27 @@ F3D behavior can be fully controlled from the command line using the following o

## Application Options

Options|Type<br>Default|Description
------|------|------
\-\-input=\<input file\>|string<br>-|The input file or files to read, can also be provided as a positional argument.
\-\-output=\<png file\>|string<br>-|Instead of showing a render view and render into it, *render directly into a png file*. When used with \-\-ref option, only outputs on failure. If `-` is specified instead of a filename, the PNG file is streamed to the stdout. Can use [template variables](#filename-templating).
\-\-no-background|bool<br>false|Use with \-\-output to output a png file with a transparent background.
-h, \-\-help||Print *help* and exit. Ignore `--verbose`.
\-\-version||Show *version* information and exit. Ignore `--verbose`.
\-\-list-readers||List available *readers* and exit. Ignore `--verbose`.
\-\-force-reader=\<reader\>|string<br>-|Force a specific reader to be used, disrigarding the file extension.
\-\-list-bindings||List available *bindings* and exit. Ignore `--verbose`.
\-\-list-rendering-backends||List available *rendering backends* and exit. Ignore `--verbose`.
\-\-config=\<config file path/name/stem\>|string<br>config|Specify the [configuration file](CONFIGURATION_FILE.md) to use. Supports absolute/relative path but also filename/filestem to search for in standard configuration file locations.
\-\-no-config|bool<br>false|Do not read any configuration file and consider only the command line options.
\-\-no-render|bool<br>false|Do not render anything and quit just after loading the first file, use with \-\-verbose to recover information about a file.
\-\-max-size=\<size in MiB\>|int<br>-1|Prevent F3D to load a file bigger than the provided size in Mib, leave empty for unlimited, useful for thumbnails.
\-\-watch|bool<br>false|Watch current file and automatically reload it whenever it is modified on disk.
\-\-frame-rate=\<fps\>|double<br>30.0|Frame rate used to refresh animation and other repeated tasks (watch, UI). Does not impact rendering frame rate.
\-\-load-plugins=\<paths or names\>|string<br>-|List of plugins to load separated with a comma. Official plugins are `alembic`, `assimp`, `draco`, `exodus`, `occt`, `usd`, `vdb`. See [plugins](PLUGINS.md) for more info.
\-\-scan-plugins||Scan standard directories for plugins and display their names, results may be incomplete. See [plugins](PLUGINS.md) for more info.
\-\-screenshot-filename=\<png file\>|string<br>`{app}/{model}_{n}.png`|Filename to save [screenshots](INTERACTIONS.md#taking-screenshots) to. Can use [template variables](#filename-templating). Supports relative paths [as described](INTERACTIONS.md#taking-screenshots).
\-\-rendering-backend=\<auto\|egl\|osmesa\|glx\|wgl\>|string<br>auto|Rendering backend to load, `auto` means to let F3D pick the correct one for you depending on your system capabilities. Use `egl` or `osmesa` on linux to force headless rendering.
| Options | Type<br>Default | Description |
| ----------------------------------------------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \-\-input=\<input file\> | string<br>- | The input file or files to read, can also be provided as a positional argument. |
| \-\-output=\<png file\> | string<br>- | Instead of showing a render view and render into it, _render directly into a png file_. When used with \-\-ref option, only outputs on failure. If `-` is specified instead of a filename, the PNG file is streamed to the stdout. Can use [template variables](#filename-templating). |
| \-\-no-background | bool<br>false | Use with \-\-output to output a png file with a transparent background. |
| -h, \-\-help | | Print _help_ and exit. Ignore `--verbose`. |
| \-\-version | | Show _version_ information and exit. Ignore `--verbose`. |
| \-\-list-readers | | List available _readers_ and exit. Ignore `--verbose`. |
| \-\-force-reader=\<reader\> | string<br>- | Force a specific reader to be used, disrigarding the file extension. |
| \-\-list-bindings | | List available _bindings_ and exit. Ignore `--verbose`. |
| \-\-list-rendering-backends | | List available _rendering backends_ and exit. Ignore `--verbose`. |
| \-\-config=\<config file path/name/stem\> | string<br>config | Specify the [configuration file](CONFIGURATION_FILE.md) to use. Supports absolute/relative path but also filename/filestem to search for in standard configuration file locations. |
| \-\-no-config | bool<br>false | Do not read any configuration file and consider only the command line options. |
| \-\-no-render | bool<br>false | Do not render anything and quit just after loading the first file, use with \-\-verbose to recover information about a file. |
| \-\-max-size=\<size in MiB\> | int<br>-1 | Prevent F3D to load a file bigger than the provided size in Mib, leave empty for unlimited, useful for thumbnails. |
| \-\-watch | bool<br>false | Watch current file and automatically reload it whenever it is modified on disk. |
| \-\-frame-rate=\<fps\> | double<br>30.0 | Frame rate used to refresh animation and other repeated tasks (watch, UI). Does not impact rendering frame rate. |
| \-\-load-plugins=\<paths or names\> | string<br>- | List of plugins to load separated with a comma. Official plugins are `alembic`, `assimp`, `draco`, `exodus`, `occt`, `usd`, `vdb`. See [plugins](PLUGINS.md) for more info. |
| \-\-scan-plugins | | Scan standard directories for plugins and display their names, results may be incomplete. See [plugins](PLUGINS.md) for more info. |
| \-\-screenshot-filename=\<png file\> | string<br>`{app}/{model}_{n}.png` | Filename to save [screenshots](INTERACTIONS.md#taking-screenshots) to. Can use [template variables](#filename-templating). Supports relative paths [as described](INTERACTIONS.md#taking-screenshots). |
| \-\-rendering-backend=\<auto\|egl\|osmesa\|glx\|wgl\> | string<br>auto | Rendering backend to load, `auto` means to let F3D pick the correct one for you depending on your system capabilities. Use `egl` or `osmesa` on linux to force headless rendering. |

## General Options

Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.