diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:24:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:24:14 +0300 |
commit | 41d4a1986548e66a652221e4a68c52900474eeff (patch) | |
tree | 26acf937ea0b762977f89adcc4e74a3ec9ecee62 /source/blender/freestyle/intern/application | |
parent | 108045faa01849115c54190ebed788faf36dcb56 (diff) |
ClangFormat: format '#if 0' code in source/
Diffstat (limited to 'source/blender/freestyle/intern/application')
3 files changed, 58 insertions, 26 deletions
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp index 8248266bbf5..ab1da79a77f 100644 --- a/source/blender/freestyle/intern/application/AppCanvas.cpp +++ b/source/blender/freestyle/intern/application/AppCanvas.cpp @@ -135,8 +135,18 @@ void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) co float yfac = ((float)recty) / ((float)(ymax - ymin)); #if 0 if (G.debug & G_DEBUG_FREESTYLE) { - printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, - xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); + printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", + w, + h, + x, + y, + xsch, + ysch, + xmax - xmin, + ymax - ymin, + rectx, + recty, + (int)(xfac * 100.0f)); } #endif int ii, jj; @@ -173,8 +183,18 @@ void AppCanvas::readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) c float yfac = ((float)recty) / ((float)(ymax - ymin)); #if 0 if (G.debug & G_DEBUG_FREESTYLE) { - printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y, - xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f)); + printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", + w, + h, + x, + y, + xsch, + ysch, + xmax - xmin, + ymax - ymin, + rectx, + recty, + (int)(xfac * 100.0f)); } #endif int ii, jj; diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index e6066123a33..d516b865eab 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -76,8 +76,8 @@ Controller::Controller() { const string sep(Config::DIR_SEP.c_str()); #if 0 - const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + sep + - Config::OPTIONS_CURRENT_DIRS_FILE; + 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 @@ -337,7 +337,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph } soc QFileInfo qfi(iFileName); - soc string basename((const char*)qfi.fileName().toAscii().data()); + soc string basename((const char *)qfi.fileName().toAscii().data()); char cleaned[FILE_MAX]; BLI_strncpy(cleaned, iFileName, FILE_MAX); BLI_cleanup_file(NULL, cleaned); @@ -633,31 +633,31 @@ void Controller::ComputeSteerableViewMap() // Build 4 nodes containing the edges in the 4 directions NodeGroup *ng[Canvas::NB_STEERABLE_VIEWMAP]; unsigned i; - real c = 32.0f/255.0f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32. + real c = + 32.0f / + 255.0f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32. for (i = 0; i < Canvas::NB_STEERABLE_VIEWMAP; ++i) { ng[i] = new NodeGroup; } NodeShape *completeNS = new NodeShape; - completeNS->material().setDiffuse(c,c,c,1); - ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); + completeNS->material().setDiffuse(c, c, c, 1); + ng[Canvas::NB_STEERABLE_VIEWMAP - 1]->AddChild(completeNS); SteerableViewMap *svm = _Canvas->getSteerableViewMap(); svm->Reset(); - ViewMap::fedges_container& fedges = _ViewMap->FEdges(); + ViewMap::fedges_container &fedges = _ViewMap->FEdges(); LineRep *fRep; NodeShape *ns; - for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end(); - f != fend; - ++f) - { + for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end(); f != fend; + ++f) { if ((*f)->viewedge()->qi() != 0) continue; fRep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d()); - completeNS->AddRep(fRep); // add to the complete map anyway + completeNS->AddRep(fRep); // add to the complete map anyway double *oweights = svm->AddFEdge(*f); for (i = 0; i < (Canvas::NB_STEERABLE_VIEWMAP - 1); ++i) { ns = new NodeShape; - double wc = oweights[i]*c; + double wc = oweights[i] * c; if (oweights[i] == 0) continue; ns->material().setDiffuse(wc, wc, wc, 1); @@ -713,7 +713,6 @@ void Controller::ComputeSteerableViewMap() # endif } - svm->buildImagesPyramids(img, false, 0, 1.0f); #endif } @@ -1085,10 +1084,11 @@ void Controller::displayDensityCurves(int x, int y) // display the curves #if 0 for (i = 0; i < nbCurves; ++i) - _pDensityCurvesWindow->setOrientationCurve(i, Vec2d(0, 0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + _pDensityCurvesWindow->setOrientationCurve( + i, Vec2d(0, 0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); for (i = 1; i <= 8; ++i) - _pDensityCurvesWindow->setLevelCurve(i, Vec2d(0, 0), Vec2d(nbCurves, 1), curvesDirection[i], - "orientation", "density"); + _pDensityCurvesWindow->setLevelCurve( + i, Vec2d(0, 0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); _pDensityCurvesWindow->show(); #endif } diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index be8553c73e1..b287a515ba1 100644 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -94,10 +94,22 @@ class Controller { vector<ViewEdge *>::iterator vedges_end); #if 0 - NodeGroup *debugNode() {return _DebugNode;} - AppView *view() {return _pView;} - NodeGroup *debugScene() {return _DebugNode;} - Grid& grid() {return _Grid;} + NodeGroup *debugNode() + { + return _DebugNode; + } + AppView *view() + { + return _pView; + } + NodeGroup *debugScene() + { + return _DebugNode; + } + Grid &grid() + { + return _Grid; + } #endif void toggleVisibilityAlgo(); @@ -192,7 +204,7 @@ class Controller { #if 0 // Silhouette structure: - std::vector<SShape*> _SShapes; + std::vector<SShape *> _SShapes; NodeGroup *_SRoot; // Silhouette |