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

Add option to hide animation progress bar #1478

Merged
merged 9 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion application/F3DOptionsParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ void ConfigurationOptions::GetOptions(F3DAppOptions& appOptions, f3d::options& o
#ifndef F3D_NO_DEPRECATED
this->DeclareOption(grp1, "quiet", "", "Enable quiet mode, which supersede any verbose options and prevent any console output to be generated at all (deprecated, using `--verbose=quiet` instead)", deprecatedQuiet, HasDefault::YES, MayHaveConfig::YES );
#endif
this->DeclareOption(grp1, "progress", "", "Show progress bar", options.getAsBoolRef("ui.loader-progress"), HasDefault::YES, MayHaveConfig::YES);
this->DeclareOption(grp1, "progress", "", "Show loading progress bar", options.getAsBoolRef("ui.loader-progress"), HasDefault::YES, MayHaveConfig::YES);
this->DeclareOption(grp1, "animation-progress", "", "Show animation progress bar", options.getAsBoolRef("ui.animation-progress"), HasDefault::YES, MayHaveConfig::YES);
this->DeclareOption(grp1, "geometry-only", "", "Do not read materials, cameras and lights from file", appOptions.GeometryOnly, HasDefault::YES, MayHaveConfig::YES);
this->DeclareOption(grp1, "group-geometries", "", "When opening multiple files, show them all in the same scene. Force geometry-only. The configuration file for the first file will be loaded.", appOptions.GroupGeometries, HasDefault::YES, MayHaveConfig::NO);
this->DeclareOption(grp1, "up", "", "Up direction", options.getAsStringRef("scene.up-direction"), HasDefault::YES, MayHaveConfig::YES, "{-X, +X, -Y, +Y, -Z, +Z}");
Expand Down
1 change: 1 addition & 0 deletions doc/libf3d/OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ui.filename-info|string<br>-<br>render|Content of *filename info* to display.
ui.font-file|string<br>-<br>render|Use the provided FreeType compatible font file to display text.<br>Can be useful to display non-ASCII filenames.|\-\-font-file
ui.fps|bool<br>false<br>render|Display a *frame per second counter*.|\-\-fps
ui.loader-progress|bool<br>false<br>load|Show a *progress bar* when loading the file.|\-\-progress
ui.animation-progress|bool<br>false<br>load|Show a *progress bar* when playing the animation.|\-\-animation-progress
spevnev marked this conversation as resolved.
Show resolved Hide resolved
mwestphal marked this conversation as resolved.
Show resolved Hide resolved
ui.metadata|bool<br>false<br>render|Display the *metadata*.|\-\-metadata
ui.dropzone|bool<br>false<br>render|Show a drop zone.
ui.dropzone-info|string<br>-<br>render|Content of the drop zone text to display.
3 changes: 2 additions & 1 deletion library/src/animationManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ bool animationManager::Initialize(
progressRep->SetPadding(0.0, 0.0);
#endif

this->ProgressWidget->On();
if (this->Options->getAsBool("ui.animation-progress"))
this->ProgressWidget->On();
spevnev marked this conversation as resolved.
Show resolved Hide resolved
}
else
{
Expand Down
1 change: 1 addition & 0 deletions library/src/options.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ options::options()
this->Internals->init("ui.metadata", false);
this->Internals->init("ui.font-file", std::string());
this->Internals->init("ui.loader-progress", false);
this->Internals->init("ui.animation-progress", true);
mwestphal marked this conversation as resolved.
Show resolved Hide resolved

// Model
this->Internals->init("model.matcap.texture", std::string());
Expand Down