Commit 311b5725 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

GeometryManager: Search Config Path for Models By Default

(cherry picked from commit 774af7e5)
parent 595265b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -419,6 +419,7 @@ If the path is a directory, all files in the directory are added (without recurs
\item The location where the models are installed to (refer to the description of the \parameter{MODEL_DIRECTORY} variable in Section~\ref{sec:cmake_config}).
\item The standard data paths on the system as given by the environmental variable \parameter{$XDG_DATA_DIRS} with ``\project/models'' appended.
The \parameter{$XDG_DATA_DIRS} variable defaults to \textit{/usr/local/share/} (thus effectively \textit{/usr/local/share/\project/models}) followed by \textit{/usr/share/} (effectively \textit{/usr/share/\project/models}).
\item The path of the main configuration file.
\end{enumerate}

\section{Passing Objects using Messages}
+5 −0
Original line number Diff line number Diff line
@@ -124,6 +124,11 @@ void GeometryManager::load(ConfigManager* conf_manager, RandomNumberGenerator& s
            LOG(TRACE) << "Registered global model path: " << data_dir;
        }
    }
    auto config_file_path = global_config.getFilePath();
    if(!config_file_path.empty() && std::filesystem::is_directory(config_file_path.parent_path())) {
        model_paths_.emplace_back(config_file_path.parent_path());
        LOG(TRACE) << "Registered path of configuration file as model location.";
    }
}

/**