Skip to content

Commit

Permalink
Add a meta importer (#1609)
Browse files Browse the repository at this point in the history
Add a meta importer to support easy grouping of file and model options on all files, even full scene files.
 - Fix #653
 - Reduce the scope of vtkF3DGenericImporter, now single file and no coloring, just easy access to internal datasets
 - Add a vtkF3DMetaImporter to recover all actors from multiple importers and add point sprites/volume actors on top
 - Update vtkF3DRendererWithColoring to recover the data from meta importer
 - libf3d: Make many model options optionals
 - window: Use model option on all files
 - loader: rework API to support adding files easily
 - F3DApplication: Remove geometry-only and group-geometries and add multi-file-mode
 - F3DStarter: Add grouping logic for multi-file-mode
 - Remove unused VTK_READER from plugins
 - Add tons of tests
 - Update doc
  • Loading branch information
mwestphal authored Oct 8, 2024
1 parent 77c2598 commit 1eeaf2c
Show file tree
Hide file tree
Showing 151 changed files with 2,598 additions and 2,021 deletions.
1 change: 1 addition & 0 deletions .github/workflows/public-api-warn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request_target:
paths:
- 'library/public/*.h'
- 'library/public/*.h.in'

jobs:
public-api-warn:
Expand Down
2 changes: 1 addition & 1 deletion application/F3DNSDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ - (BOOL)application:(NSApplication*)theApplication openFile:(NSString*)filename
{
(void)theApplication;
Starter->AddFile([filename UTF8String]);
Starter->LoadFile();
Starter->LoadFileGroup();
Starter->Render();
return YES;
}
Expand Down
5 changes: 2 additions & 3 deletions application/F3DOptionsTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{ { "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" },
{ "animation-progress", "", "Show animation progress bar", "<bool>", "1" },
{ "geometry-only", "", "Do not read materials, cameras and lights from file", "<bool>", "1" },
{ "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.", "<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}", "" },
{ "axis", "x", "Show axes", "<bool>", "1" }, { "grid", "g", "Show grid", "<bool>", "1" },
{ "grid-absolute", "", "Position grid at the absolute origin instead of below the model", "<bool>", "1" },
Expand All @@ -96,7 +95,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{
{"animation-frame-rate", "", "Set animation frame rate when playing animation interactively", "<frame rate>", ""},
{"font-file", "", "Path to a FreeType compatible font file", "<file_path>", ""} } },
{ "Material",
{ {"point-sprites", "o", "Show sphere sprites instead of geometry", "<bool>", "1" },
{ {"point-sprites", "o", "Show sphere sprites instead of surfaces", "<bool>", "1" },
{"point-sprites-type", "", "Point sprites type", "<sphere|gaussian>", ""},
{"point-sprites-size", "", "Point sprites size", "<size>", ""},
{"point-size", "", "Point size when showing vertices, model specified by default", "<size>", ""},
Expand Down
3 changes: 1 addition & 2 deletions application/F3DOptionsTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ static inline const OptionsDict DefaultAppOptions = {
{ "load-plugins", "" },
{ "screenshot-filename", "{app}/{model}_{n}.png" },
{ "verbose", "info" },
{ "geometry-only", "false" },
{ "group-geometries", "false" },
{ "multi-file-mode", "single" },
{ "resolution", "1000, 600" },
{ "position", "" },
{ "colormap-file", "" },
Expand Down
Loading

0 comments on commit 1eeaf2c

Please sign in to comment.