diff options
Diffstat (limited to 'source/blender/freestyle/intern')
12 files changed, 41 insertions, 26 deletions
diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp index cbe0742f843..e09d958d564 100644 --- a/source/blender/freestyle/intern/application/AppView.cpp +++ b/source/blender/freestyle/intern/application/AppView.cpp @@ -105,10 +105,10 @@ AppView::AppView(const char *iName) AppView::~AppView() { - int ref = _RootNode.destroy(); + /*int ref =*/ /* UNUSED */ _RootNode.destroy(); _Light.destroy(); - ref = _p2DNode.destroy(); + /*ref =*/ /* UNUSED */ _p2DNode.destroy(); } real AppView::distanceToSceneCenter() diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index 11124b60b06..e9586e347a2 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -106,7 +106,7 @@ NodeGroup* BlenderFileLoader::Load() int BlenderFileLoader::countClippedFaces(float v1[3], float v2[3], float v3[3], int clip[3]) { float *v[3]; - int numClipped, sum, numTris; + int numClipped, sum, numTris = 0; v[0] = v1; v[1] = v2; @@ -356,7 +356,7 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id) // We parse vlak nodes and count the number of faces after the clipping by // the near and far view planes is applied (Note: mesh vertices are in the // camera coordinate system). - VlakRen *vlr; + VlakRen *vlr = NULL; unsigned numFaces = 0; float v1[3], v2[3], v3[3], v4[3]; float n1[3], n2[3], n3[3], n4[3], facenormal[3]; diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index f80761c3cc7..ca4cbd35edc 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -117,6 +117,10 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) : Str freestyle_scene->r.im_format.imtype = R_IMF_IMTYPE_PNG; BKE_scene_disable_color_management(freestyle_scene); + if (G.debug & G_DEBUG_FREESTYLE) { + printf("%s: %d threads\n", __func__, freestyle_scene->r.threads); + } + // Render layer SceneRenderLayer *srl = (SceneRenderLayer *)freestyle_scene->r.layers.first; srl->layflag = SCE_LAY_SOLID | SCE_LAY_ZTRA; @@ -221,7 +225,7 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const vector<Strip*>& strips = iStrokeRep->getStrips(); Strip::vertex_container::iterator v[3]; StrokeVertexRep *svRep[3]; - Vec3r color[3]; + /* Vec3r color[3]; */ /* UNUSED */ unsigned int vertex_index, edge_index, loop_index; Vec2r p; @@ -481,6 +485,8 @@ Object *BlenderStrokeRenderer::NewMesh() const #if 0 BKE_scene_base_deselect_all(scene); BKE_scene_base_select(scene, base); +#else + (void)base; #endif ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h index d1c82e7a3b4..89bb20b4bed 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef __BLENDERSTROKERENDERER_H__ -#define __BLENDERSTROKERENDERER_H__ +#ifndef __BLENDER_STROKE_RENDERER_H__ +#define __BLENDER_STROKE_RENDERER_H__ /** \file blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h * \ingroup freestyle @@ -73,4 +73,4 @@ protected: float get_stroke_vertex_z(void) const; }; -#endif // __BLENDERSTROKERENDERER_H__ +#endif // __BLENDER_STROKE_RENDERER_H__ diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 40bd0911c9c..8b237673b8a 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -37,6 +37,9 @@ #include <cstring> // for memset #include <float.h> +#ifndef _MSC_VER +#include <stdint.h> // For SET_UINT_IN_POINTER, i.e. uintptr_t. +#endif #include <vector> #include "Geom.h" @@ -45,6 +48,10 @@ #include "../system/FreestyleConfig.h" +extern "C" { + #include "BLI_utildefines.h" +} + using namespace std; using namespace Geometry; @@ -325,8 +332,8 @@ protected: visitor.discoverCell(current_cell); OccludersSet& occluders = current_cell->getOccluders(); // FIXME: I had forgotten the ref & for (OccludersSet::iterator it = occluders.begin(); it != occluders.end(); it++) { - if ((unsigned long)(*it)->userdata2 != _timestamp) { - (*it)->userdata2 = (void*)_timestamp; + if (GET_UINT_FROM_POINTER((*it)->userdata2) != _timestamp) { + (*it)->userdata2 = SET_UINT_IN_POINTER(_timestamp); visitor.examineOccluder(*it); } } diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp index 5426c60d3e1..3ac9cbbcbdc 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp +++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp @@ -96,14 +96,14 @@ void NodeGroup::DetachChildren() void NodeGroup::DetachChild(Node *iChild) { - int found = 0; + /* int found = 0; */ /* UNUSED */ vector<Node*>::iterator node; for (node = _Children.begin(); node != _Children.end(); ++node) { if ((*node) == iChild) { (*node)->release(); _Children.erase(node); - found = 1; + /* found = 1; */ /* UNUSED */ break; } } diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp index f757f6ced82..2df4d19195e 100644 --- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp @@ -124,7 +124,7 @@ int GetDirectionalViewMapDensityF1D::operator()(Interface1D& inter) int GetCompleteViewMapDensityF1D::operator()(Interface1D& inter) { //soc unsigned size; - Id id = inter.getId(); + /* Id id = inter.getId(); */ /* UNUSED */ result = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); return 0; } diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index 245f4cfb3de..fd070a59699 100644 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -226,10 +226,10 @@ ThicknessVariationPatternShader::ThicknessVariationPatternShader(const string pa int ThicknessVariationPatternShader::shade(Stroke& stroke) const { StrokeInternal::StrokeVertexIterator v, vend; - float *array = 0; - int size; + float *array = NULL; + /* int size; */ /* UNUSED */ array = _aThickness; - size = _size; + /* size = _size; */ /* UNUSED */ int vert_size = stroke.strokeVerticesSize(); int sig = 0; unsigned index; diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index e69b4dab712..bc117925a4c 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -292,10 +292,10 @@ void Strip::createStrip (const vector<StrokeVertex*>& iStrokeVertices) _vertices.push_back(new StrokeVertexRep(sv->getPoint() + thicknessLast[1] * stripDirLast)); ++i; _vertices.push_back(new StrokeVertexRep(sv->getPoint() - thicknessLast[0] * stripDirLast)); - int n = i; ++i; #if 0 + int n = i - 1; // check whether the orientation of the extremity was user defined userDir = _stroke->getEndingOrientation(); if (userDir != Vec2r(0, 0)) { diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index f3ab3c6d94a..56c32d8e134 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -67,7 +67,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, ViewShape *oVShape, vect // Reinit structures Init(oVShape); - ViewEdge *vedge; + /* ViewEdge *vedge; */ /* UNUSED */ // Let us build the smooth stuff //---------------------------------------- // We parse all faces to find the ones that contain smooth edges @@ -87,7 +87,7 @@ void ViewEdgeXBuilder::BuildViewEdges(WXShape *iWShape, ViewShape *oVShape, vect continue; // here we know that we're dealing with a face layer that has not been processed yet and that contains // a smooth edge. - vedge = BuildSmoothViewEdge(OWXFaceLayer(*sl, true)); + /* vedge =*/ /* UNUSED */ BuildSmoothViewEdge(OWXFaceLayer(*sl, true)); } } @@ -225,7 +225,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) // Find first edge: OWXEdge firstWEdge = iWEdge; - OWXEdge previousWEdge = firstWEdge; + /* OWXEdge previousWEdge = firstWEdge; */ /* UNUSED */ OWXEdge currentWEdge = firstWEdge; list<OWXEdge> edgesChain; #if 0 /* TK 02-Sep-2012 Experimental fix for incorrect view edge visibility. */ diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index fc7da724e8f..ea959bfd81d 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -573,6 +573,8 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, G& grid, real epsilo if (_global.debug & G_DEBUG_FREESTYLE) { cout << "\tConclusion: QI = " << maxIndex << ", " << (*ve)->occluders_size() << " occluders." << endl; } + #else + (void)maxIndex; #endif // occludee -- if (!wFaces.empty()) { diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index 978272848ec..0e0e02dcaee 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -1101,17 +1101,17 @@ int save(ostream& out, ViewMap *vm, ProgressBar *pb) // For every object, initialize its userdata member to its index in the ViewMap list for (unsigned int i0 = 0; i0 < vm->ViewShapes().size(); i0++) { - vm->ViewShapes()[i0]->userdata = (void *)i0; - vm->ViewShapes()[i0]->sshape()->userdata = (void *)i0; + vm->ViewShapes()[i0]->userdata = SET_UINT_IN_POINTER(i0); + vm->ViewShapes()[i0]->sshape()->userdata = SET_UINT_IN_POINTER(i0); } for (unsigned int i1 = 0; i1 < vm->FEdges().size(); i1++) - vm->FEdges()[i1]->userdata = (void *)i1; + vm->FEdges()[i1]->userdata = SET_UINT_IN_POINTER(i1); for (unsigned int i2 = 0; i2 < vm->SVertices().size(); i2++) - vm->SVertices()[i2]->userdata = (void *)i2; + vm->SVertices()[i2]->userdata = SET_UINT_IN_POINTER(i2); for (unsigned int i3 = 0; i3 < vm->ViewEdges().size(); i3++) - vm->ViewEdges()[i3]->userdata = (void *)i3; + vm->ViewEdges()[i3]->userdata = SET_UINT_IN_POINTER(i3); for (unsigned int i4 = 0; i4 < vm->ViewVertices().size(); i4++) - vm->ViewVertices()[i4]->userdata = (void *)i4; + vm->ViewVertices()[i4]->userdata = SET_UINT_IN_POINTER(i4); // Write the current options unsigned char flags = Options::getFlags(); |