Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/application/Controller.cpp
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup freestyle | * \ingroup freestyle | ||||
| */ | */ | ||||
| extern "C" { | extern "C" { | ||||
| #include <Python.h> | #include <Python.h> | ||||
| } | } | ||||
| #include <cfloat> | #include <cfloat> | ||||
| #include <fstream> | #include <fstream> | ||||
| #include <string> | #include <string> | ||||
| #include "AppCanvas.h" | #include "AppCanvas.h" | ||||
| #include "AppConfig.h" | |||||
| #include "AppView.h" | #include "AppView.h" | ||||
| #include "Controller.h" | #include "Controller.h" | ||||
| #include "../image/Image.h" | #include "../image/Image.h" | ||||
| #include "../scene_graph/NodeDrawingStyle.h" | #include "../scene_graph/NodeDrawingStyle.h" | ||||
| #include "../scene_graph/NodeShape.h" | #include "../scene_graph/NodeShape.h" | ||||
| #include "../scene_graph/NodeTransform.h" | #include "../scene_graph/NodeTransform.h" | ||||
| Show All 29 Lines | |||||
| #include "DNA_freestyle_types.h" | #include "DNA_freestyle_types.h" | ||||
| #include "FRS_freestyle.h" | #include "FRS_freestyle.h" | ||||
| namespace Freestyle { | namespace Freestyle { | ||||
| Controller::Controller() | Controller::Controller() | ||||
| { | { | ||||
| const string sep(Config::DIR_SEP); | |||||
| #if 0 | |||||
| const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + | |||||
| sep + Config::OPTIONS_CURRENT_DIRS_FILE; | |||||
| _current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true); | |||||
| #endif | |||||
| _RootNode = new NodeGroup; | _RootNode = new NodeGroup; | ||||
| _RootNode->addRef(); | _RootNode->addRef(); | ||||
| #if 0 | #if 0 | ||||
| _SilhouetteNode = NULL; | _SilhouetteNode = NULL; | ||||
| _ProjectedSilhouette = NULL; | _ProjectedSilhouette = NULL; | ||||
| _VisibleProjectedSilhouette = NULL; | _VisibleProjectedSilhouette = NULL; | ||||
| ▲ Show 20 Lines • Show All 1,013 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| } | } | ||||
| void Controller::init_options() | void Controller::init_options() | ||||
| { | { | ||||
| // from AppOptionsWindow.cpp | // from AppOptionsWindow.cpp | ||||
| // Default init options | // Default init options | ||||
| Config::Path *cpath = Config::Path::getInstance(); | |||||
| // Directories | |||||
| TextureManager::Options::setPatternsPath(cpath->getPatternsPath()); | |||||
| TextureManager::Options::setBrushesPath(cpath->getModelsPath()); | |||||
| // ViewMap Format | // ViewMap Format | ||||
| setComputeSteerableViewMapFlag(false); | setComputeSteerableViewMapFlag(false); | ||||
| // Visibility | // Visibility | ||||
| setQuantitativeInvisibility(true); | setQuantitativeInvisibility(true); | ||||
| // soc: initialize canvas | // soc: initialize canvas | ||||
| _Canvas->init(); | _Canvas->init(); | ||||
| // soc: initialize passes | // soc: initialize passes | ||||
| setPassDiffuse(nullptr, 0, 0); | setPassDiffuse(nullptr, 0, 0); | ||||
| setPassZ(nullptr, 0, 0); | setPassZ(nullptr, 0, 0); | ||||
| } | } | ||||
| } /* namespace Freestyle */ | } /* namespace Freestyle */ | ||||