Skip to content
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

Updating CLI options names for clarity #1819

Merged
merged 6 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions .github/actions/generic-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ runs:
inputs.cpu != 'arm64' && inputs.static_label == 'no-static' && inputs.optional_deps_label == 'optional-deps'
shell: bash
working-directory: ${{github.workspace}}/install
run: F3D_PLUGINS_PATH=$(pwd)/../build_plugins/example-plugin${{ runner.os == 'Windows' && '/Release' || null }} ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --load-plugins=example --output=../install_example_plugin_output.png --ref=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --rendering-backend=${{ inputs.rendering_backend }} --verbose
run: F3D_PLUGINS_PATH=$(pwd)/../build_plugins/example-plugin${{ runner.os == 'Windows' && '/Release' || null }} ${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --load-plugins=example --output=../install_example_plugin_output.png --reference=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --rendering-backend=${{ inputs.rendering_backend }} --verbose

- name: Install plugin examples
if: inputs.static_label == 'no-static'
Expand All @@ -369,7 +369,7 @@ runs:
shell: bash
working-directory: ${{github.workspace}}/install
run: |
${{ env.F3D_BIN_PATH }} ../source/testing/data/dragon.vtu --output=output/install_output.png --ref=../source/.github/baselines/install_output.png --resolution=300,300 --colormap-file=viridis --coloring-component=0 --verbose --rendering-backend=${{ inputs.rendering_backend }}
${{ env.F3D_BIN_PATH }} ../source/testing/data/dragon.vtu --output=output/install_output.png --reference=../source/.github/baselines/install_output.png --resolution=300,300 --colormap-file=viridis --coloring-component=0 --verbose --rendering-backend=${{ inputs.rendering_backend }}

- name: Check Install plugins
if: |
Expand All @@ -379,7 +379,7 @@ runs:
shell: bash
working-directory: ${{github.workspace}}/install
run: |
${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --output=../install_example_plugin_output.png --ref=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --verbose --rendering-backend=${{ inputs.rendering_backend }}
${{ env.F3D_BIN_PATH }} ../source/examples/plugins/example-plugin/data.expl --output=../install_example_plugin_output.png --reference=../source/.github/baselines/install_example_plugin_output.png --resolution=300,300 --verbose --rendering-backend=${{ inputs.rendering_backend }}

- name: Upload Tests Install Artifact
if: failure()
Expand Down
20 changes: 10 additions & 10 deletions application/F3DOptionsTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{ "screenshot-filename", "", "Screenshot filename", "<filename>", "" } } },
{ "General",
{ { "verbose", "", "Set verbose level, providing more information about the loaded data in the console output", "{debug, info, warning, error, quiet}", "debug" },
{ "progress", "", "Show loading progress bar", "<bool>", "1" },
{ "loading-progress", "", "Show loading progress bar", "<bool>", "1" },
{ "animation-progress", "", "Show animation progress bar", "<bool>", "1" },
{ "multi-file-mode", "", R"(Choose the behavior when opening multiple files. "single" will show one file at a time, "all" will show all files in a single scene.)", "<single|all>", "" },
{ "up", "", "Up direction", "{-X, +X, -Y, +Y, -Z, +Z}", "" },
Expand All @@ -91,7 +91,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{ "grid-color", "", "Color of main grid lines", "<R,G,B>", "" },
{ "edges", "e", "Show cell edges", "<bool>", "1" },
{ "camera-index", "", "Select the camera to use", "<index>", "" },
{ "trackball", "k", "Enable trackball interaction", "<bool>", "1" },
{ "interaction-trackball", "k", "Enable trackball interaction", "<bool>", "1" },
{ "invert-zoom", "", "Invert zoom direction with right mouse click", "<bool>", "1" },
{ "animation-autoplay", "", "Automatically start animation", "<bool>", "1" },
{ "animation-index", "", "Select animation to show", "<index>", "" },
Expand Down Expand Up @@ -134,13 +134,13 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{ {"scalar-coloring", "s", "Color by a scalar array", "<bool>", "1" },
{"coloring-array", "", "Name of the array to color with", "<array_name>", "" },
{"coloring-component", "y", "Component from the array to color with. -1 means magnitude, -2 or the short option, -y, means direct scalars", "<comp_index>", "-2"},
{"cells", "c", "Use an array from the cells", "<bool>", "1"},
{"range", "", "Custom range for the coloring by array, automatically computed by default", "<min,max>", ""},
{"bar", "b", "Show scalar bar", "<bool>", "1" },
{"coloring-by-cells", "c", "Use an array from the cells", "<bool>", "1"},
{"coloring-range", "", "Custom range for the coloring by array, automatically computed by default", "<min,max>", ""},
{"coloring-scalar-bar", "b", "Show scalar bar", "<bool>", "1" },
{"colormap-file", "", "Specify a colormap image", "<filePath/filename/fileStem>", ""},
{"colormap", "", "Specify a custom colormap (ignored if \"colormap-file\" is specified)", "<color_list>", ""},
{"volume", "v", "Show volume if the file is compatible", "<bool>", "1"},
{"inverse", "i", "Inverse opacity function for volume rendering", "<bool>", "1"} } },
{"volume-inverse", "i", "Inverse opacity function for volume rendering", "<bool>", "1"} } },
{"Camera",
{ {"camera-position", "", "Camera position (overrides camera direction and camera zoom factor if any)", "<X,Y,Z>", ""},
{"camera-focal-point", "", "Camera focal point", "<X,Y,Z>", ""},
Expand All @@ -155,8 +155,8 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
#if F3D_MODULE_RAYTRACING
{"Raytracing",
{ {"raytracing", "r", "Enable raytracing", "<bool>", "1"},
{"samples", "", "Number of samples per pixel", "<samples>", ""},
{"denoise", "d", "Denoise the image", "<bool>", "1"} } },
{"raytracing-samples", "", "Number of samples per pixel", "<samples>", ""},
{"raytracing-denoise", "d", "Denoise the image", "<bool>", "1"} } },
#endif
{"PostFX (OpenGL)",
{ {"translucency-support", "p", "Enable translucency support, implemented using depth peeling", "<bool>", "1"},
Expand All @@ -165,8 +165,8 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{"tone-mapping", "t", "Enable Tone Mapping, providing balanced coloring", "<bool>", "1"},
{"final-shader", "", "Execute the final shader at the end of the rendering pipeline", "<GLSL code>", ""} } },
{"Testing",
{ {"ref", "", "Reference", "<png file>", ""},
{"ref-threshold", "", "Testing threshold", "<threshold>", ""},
{ {"reference", "", "Reference", "<png file>", ""},
{"reference-threshold", "", "Testing threshold", "<threshold>", ""},
{"interaction-test-record", "", "Path to an interaction log file to record interactions events to", "<file_path>", ""},
{"interaction-test-play", "", "Path to an interaction log file to play interaction events from when loading a file", "<file_path>", ""} } }
}};
Expand Down
20 changes: 10 additions & 10 deletions application/F3DOptionsTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ static inline const OptionsDict DefaultAppOptions = {
{ "camera-zoom-factor", "0.0" },
{ "camera-azimuth-angle", "0.0" },
{ "camera-elevation-angle", "0.0" },
{ "ref", "" },
{ "ref-threshold", "0.04" },
{ "reference", "" },
{ "reference-threshold", "0.04" },
{ "interaction-test-record", "" },
{ "interaction-test-play", "" },
{ "command-script", "" },
Expand All @@ -63,7 +63,7 @@ static inline const OptionsDict DefaultAppOptions = {
* Mapping of CLI option name to their libf3d options name counterpart
*/
static inline const std::map<std::string_view, std::string_view> LibOptionsNames = {
{ "progress", "ui.loader_progress" },
{ "loading-progress", "ui.loader_progress" },
{ "animation-progress", "ui.animation_progress" },
{ "up", "scene.up_direction" },
{ "axis", "ui.axis" },
Expand All @@ -74,7 +74,7 @@ static inline const std::map<std::string_view, std::string_view> LibOptionsNames
{ "grid-color", "render.grid.color" },
{ "edges", "render.show_edges" },
{ "camera-index", "scene.camera.index" },
{ "trackball", "interactor.trackball" },
{ "interaction-trackball", "interactor.trackball" },
{ "invert-zoom", "interactor.invert_zoom" },
{ "animation-autoplay", "scene.animation.autoplay" },
{ "animation-index", "scene.animation.index" },
Expand Down Expand Up @@ -110,16 +110,16 @@ static inline const std::map<std::string_view, std::string_view> LibOptionsNames
{ "coloring-array", "model.scivis.array_name" },
{ "light-intensity", "render.light.intensity" },
{ "coloring-component", "model.scivis.component" },
{ "cells", "model.scivis.cells" },
{ "range", "model.scivis.range" },
{ "bar", "ui.scalar_bar" },
{ "coloring-by-cells", "model.scivis.cells" },
{ "coloring-range", "model.scivis.range" },
{ "coloring-scalar-bar", "ui.scalar_bar" },
{ "colormap", "model.scivis.colormap" },
{ "volume", "model.volume.enable" },
{ "inverse", "model.volume.inverse" },
{ "volume-inverse", "model.volume.inverse" },
{ "camera-orthographic", "scene.camera.orthographic" },
{ "raytracing", "render.raytracing.enable" },
{ "samples", "render.raytracing.samples" },
{ "denoise", "render.raytracing.denoise" },
{ "raytracing-samples", "render.raytracing.samples" },
{ "raytracing-denoise", "render.raytracing.denoise" },
{ "translucency-support", "render.effect.translucency_support" },
{ "ambient-occlusion", "render.effect.ambient_occlusion" },
{ "anti-aliasing", "render.effect.anti_aliasing" },
Expand Down
5 changes: 3 additions & 2 deletions application/F3DStarter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,9 @@ class F3DStarter::F3DInternals
f3d::options::parse<double>(appOptions.at("camera-azimuth-angle")),
f3d::options::parse<double>(appOptions.at("camera-elevation-angle")) };

this->AppOptions.Reference = f3d::options::parse<std::string>(appOptions.at("ref"));
this->AppOptions.RefThreshold = f3d::options::parse<double>(appOptions.at("ref-threshold"));
this->AppOptions.Reference = f3d::options::parse<std::string>(appOptions.at("reference"));
this->AppOptions.RefThreshold =
f3d::options::parse<double>(appOptions.at("reference-threshold"));
this->AppOptions.InteractionTestRecordFile =
f3d::options::parse<std::string>(appOptions.at("interaction-test-record"));
this->AppOptions.InteractionTestPlayFile =
Expand Down
Loading
Loading