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

MegaMol Project Concept #978

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

MegaMol Project Concept #978

wants to merge 14 commits into from

Conversation

geringsj
Copy link
Contributor

@geringsj geringsj commented Jan 27, 2022

Uses current lua script file path to determine a project directory, allowing FilePath Parameters to load files relative to that directory. The project directory is injected into file parameters of newly created graph modules.

TODO

  • Should File Path Parameters automatically check for files beeing inside the project dir, and use relative paths for those?
  • What happens when saving and loading the project again?
    • MegaMolGraph Serialization preserves relative file path (uses param->ValueString())
    • GUI Serialization preserves relative file path
  • What happens when stacking project files? FilePathParams remember their respective project file
  • Optional Lua Callback Arguments (optional project name argument)
  • Do we really want to clear() the graph?
  • vislib::sys::File and vislib::sys::File::Exists() must die Only FilePathParam knows about project, re-routing all file loading through project dir too intrusive
  • Screenshots and other outputs go to project dir automatically? User configures screenshot output
  • Unify UX: Configurator project open, project add, file load, file drop
  • Adjust example projects for new file path structure

Test Instructions

The implementation works for all code paths going though the Project Loader Service, e.g. Drag & Drop of files into the window and "Load Project" in the GUI.
For example, modify the infovis.lua example to access the example data set relative to the examples directory.

-- snip --

-- old: mmSetParamValue("::CSVDataSource_1::filename",[=[../examples/sampledata/iris.csv]=])
mmSetParamValue("::CSVDataSource_1::filename",[=[sampledata/iris.csv]=])

grafik

@moritz-h moritz-h marked this pull request as draft February 16, 2022 17:35
@geringsj geringsj changed the title mmProject() MegaMol Project Concept May 19, 2022
* Absolute path to project directory. If empty, no project path available.
* This path is relative per guarantee of the frontend
*/
std::filesystem::path project_directory;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might also be just a "prefix_path"

moritz-h added a commit that referenced this pull request Jun 2, 2022
@github-actions
Copy link

github-actions bot commented Sep 7, 2022

Style check found formatting issues! Comment /format, to automatically commit the suggested changes.

@braunms
Copy link
Contributor

braunms commented Sep 7, 2022

/format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants