Skip to content

Commit

Permalink
MegaMolProject: clarify attribute semantics, project name is file name
Browse files Browse the repository at this point in the history
  • Loading branch information
geringsj committed Feb 2, 2022
1 parent 6964e0a commit 0b7680c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/resources/include/MegaMolProject.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ struct MegaMolProject {
using path = std::filesystem::path;

struct ProjectAttributes {
std::string project_name = ""; // name of project directory
path project_file;
path project_directory;
// example: C:/megamol/project.lua
std::string project_name = ""; // name of project in some way, either "projcet.lua" or "project" or "something"
path project_file; // project.lua
path project_directory; // C:/megamol/
};

std::optional<ProjectAttributes> attributes = std::nullopt;
Expand All @@ -29,7 +30,7 @@ struct MegaMolProject {
ProjectAttributes a;
a.project_file = file;
a.project_directory = path{file}.remove_filename(); // leaves trailing '/'
a.project_name = file.parent_path().filename().string();
a.project_name = file.filename().stem().string();

attributes = a;
}
Expand Down

0 comments on commit 0b7680c

Please sign in to comment.