Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/stroke/Canvas.cpp
| Show All 10 Lines | |||||
| #include "Canvas.h" | #include "Canvas.h" | ||||
| #include "StrokeRenderer.h" | #include "StrokeRenderer.h" | ||||
| #include "StyleModule.h" | #include "StyleModule.h" | ||||
| #include "../image/GaussianFilter.h" | #include "../image/GaussianFilter.h" | ||||
| #include "../image/Image.h" | #include "../image/Image.h" | ||||
| #include "../image/ImagePyramid.h" | #include "../image/ImagePyramid.h" | ||||
| #include "../system/FreestyleConfig.h" | |||||
| #include "../system/PseudoNoise.h" | #include "../system/PseudoNoise.h" | ||||
| #include "../system/TimeStamp.h" | #include "../system/TimeStamp.h" | ||||
| #include "../view_map/SteerableViewMap.h" | #include "../view_map/SteerableViewMap.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| // soc #include <qimage.h> | // soc #include <qimage.h> | ||||
| // soc #include <QString> | // soc #include <QString> | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| using namespace std; | using namespace std; | ||||
| namespace Freestyle { | namespace Freestyle { | ||||
| Canvas *Canvas::_pInstance = nullptr; | Canvas *Canvas::_pInstance = nullptr; | ||||
| const char *Canvas::_MapsPath = nullptr; | |||||
| Canvas::Canvas() | Canvas::Canvas() | ||||
| { | { | ||||
| _SelectedFEdge = nullptr; | _SelectedFEdge = nullptr; | ||||
| _pInstance = this; | _pInstance = this; | ||||
| PseudoNoise::init(42); | PseudoNoise::init(42); | ||||
| _Renderer = nullptr; | _Renderer = nullptr; | ||||
| _current_sm = nullptr; | _current_sm = nullptr; | ||||
| _steerableViewMap = new SteerableViewMap(NB_STEERABLE_VIEWMAP - 1); | _steerableViewMap = new SteerableViewMap(NB_STEERABLE_VIEWMAP - 1); | ||||
| ▲ Show 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | if (m != _maps.end()) { | ||||
| } | } | ||||
| else { | else { | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| string filePath; | string filePath; | ||||
| if (_MapsPath) { | |||||
| filePath = _MapsPath; | |||||
| filePath += iFileName; | |||||
| } | |||||
| else { | |||||
| filePath = iFileName; | filePath = iFileName; | ||||
| } | |||||
| #if 0 // soc | #if 0 // soc | ||||
| QImage *qimg; | QImage *qimg; | ||||
| QImage newMap(filePath.c_str()); | QImage newMap(filePath.c_str()); | ||||
| if (newMap.isNull()) { | if (newMap.isNull()) { | ||||
| cerr << "Could not load image file " << filePath << endl; | cerr << "Could not load image file " << filePath << endl; | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines | |||||