[Bf-blender-cvs] [252eaed] master: Freestyle: use bool instead of int.

Tamito Kajiyama noreply at git.blender.org
Tue Jun 24 16:33:53 CEST 2014


Commit: 252eaed483ca8c0d89708b3d0a2a82076f944229
Author: Tamito Kajiyama
Date:   Tue Jun 24 22:44:53 2014 +0900
https://developer.blender.org/rB252eaed483ca8c0d89708b3d0a2a82076f944229

Freestyle: use bool instead of int.

Patch contribution by flokkievids (Folkert de Vries).  Thanks!

===================================================================

M	source/blender/freestyle/intern/python/BPy_Convert.cpp
M	source/blender/freestyle/intern/python/BPy_Interface0D.cpp
M	source/blender/freestyle/intern/python/BPy_Interface0D.h
M	source/blender/freestyle/intern/python/BPy_Interface1D.cpp
M	source/blender/freestyle/intern/python/BPy_Interface1D.h
M	source/blender/freestyle/intern/python/BPy_SShape.cpp
M	source/blender/freestyle/intern/python/BPy_SShape.h
M	source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
M	source/blender/freestyle/intern/python/BPy_StrokeAttribute.h
M	source/blender/freestyle/intern/python/BPy_ViewShape.cpp
M	source/blender/freestyle/intern/python/BPy_ViewShape.h
M	source/blender/freestyle/intern/python/Director.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp
M	source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
M	source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp
M	source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
M	source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp
M	source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 746d5e7..dfa81a0 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -201,7 +201,7 @@ PyObject *BPy_Interface0D_from_Interface0D(Interface0D& if0D)
 {
 	PyObject *py_if0D =  Interface0D_Type.tp_new(&Interface0D_Type, 0, 0);
 	((BPy_Interface0D *)py_if0D)->if0D = &if0D;
-	((BPy_Interface0D *)py_if0D)->borrowed = 1;
+	((BPy_Interface0D *)py_if0D)->borrowed = true;
 	return py_if0D;
 }
 
@@ -209,7 +209,7 @@ PyObject *BPy_Interface1D_from_Interface1D(Interface1D& if1D)
 {
 	PyObject *py_if1D =  Interface1D_Type.tp_new(&Interface1D_Type, 0, 0);
 	((BPy_Interface1D *)py_if1D)->if1D = &if1D;
-	((BPy_Interface1D *)py_if1D)->borrowed = 1;
+	((BPy_Interface1D *)py_if1D)->borrowed = true;
 	return py_if1D;
 }
 
@@ -218,7 +218,7 @@ PyObject *BPy_SVertex_from_SVertex(SVertex& sv)
 	PyObject *py_sv = SVertex_Type.tp_new(&SVertex_Type, 0, 0);
 	((BPy_SVertex *)py_sv)->sv = &sv;
 	((BPy_SVertex *)py_sv)->py_if0D.if0D = ((BPy_SVertex *)py_sv)->sv;
-	((BPy_SVertex *)py_sv)->py_if0D.borrowed = 1;
+	((BPy_SVertex *)py_sv)->py_if0D.borrowed = true;
 	return py_sv;
 }
 
@@ -228,7 +228,7 @@ PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp& fes)
 	((BPy_FEdgeSharp *)py_fe)->fes = &fes;
 	((BPy_FEdgeSharp *)py_fe)->py_fe.fe = ((BPy_FEdgeSharp *)py_fe)->fes;
 	((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSharp *)py_fe)->fes;
-	((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.borrowed = 1;
+	((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.borrowed = true;
 	return py_fe;
 }
 
@@ -238,7 +238,7 @@ PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth& fes)
 	((BPy_FEdgeSmooth *)py_fe)->fes = &fes;
 	((BPy_FEdgeSmooth *)py_fe)->py_fe.fe = ((BPy_FEdgeSmooth *)py_fe)->fes;
 	((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSmooth *)py_fe)->fes;
-	((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.borrowed = 1;
+	((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.borrowed = true;
 	return py_fe;
 }
 
@@ -247,7 +247,7 @@ PyObject *BPy_FEdge_from_FEdge(FEdge& fe)
 	PyObject *py_fe = FEdge_Type.tp_new(&FEdge_Type, 0, 0);
 	((BPy_FEdge *)py_fe)->fe = &fe;
 	((BPy_FEdge *)py_fe)->py_if1D.if1D = ((BPy_FEdge *)py_fe)->fe;
-	((BPy_FEdge *)py_fe)->py_if1D.borrowed = 1;
+	((BPy_FEdge *)py_fe)->py_if1D.borrowed = true;
 	return py_fe;
 }
 
@@ -265,7 +265,7 @@ PyObject *BPy_Stroke_from_Stroke(Stroke& s)
 	PyObject *py_s = Stroke_Type.tp_new(&Stroke_Type, 0, 0);
 	((BPy_Stroke *)py_s)->s = &s;
 	((BPy_Stroke *)py_s)->py_if1D.if1D = ((BPy_Stroke *)py_s)->s;
-	((BPy_Stroke *)py_s)->py_if1D.borrowed = 1;
+	((BPy_Stroke *)py_s)->py_if1D.borrowed = true;
 	return py_s;
 }
 
@@ -273,7 +273,7 @@ PyObject *BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute& sa)
 {
 	PyObject *py_sa = StrokeAttribute_Type.tp_new(&StrokeAttribute_Type, 0, 0);
 	((BPy_StrokeAttribute *)py_sa)->sa = &sa;
-	((BPy_StrokeAttribute *)py_sa)->borrowed = 1;
+	((BPy_StrokeAttribute *)py_sa)->borrowed = true;
 	return py_sa;
 }
 
@@ -292,7 +292,7 @@ PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex& sv)
 	((BPy_StrokeVertex *)py_sv)->sv = &sv;
 	((BPy_StrokeVertex *)py_sv)->py_cp.cp = ((BPy_StrokeVertex *)py_sv)->sv;
 	((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.if0D = ((BPy_StrokeVertex *)py_sv)->sv;
-	((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = 1;
+	((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = true;
 	return py_sv;
 }
 
@@ -301,7 +301,7 @@ PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex& vv)
 	PyObject *py_vv = ViewVertex_Type.tp_new(&ViewVertex_Type, 0, 0);
 	((BPy_ViewVertex *)py_vv)->vv = &vv;
 	((BPy_ViewVertex *)py_vv)->py_if0D.if0D = ((BPy_ViewVertex *)py_vv)->vv;
-	((BPy_ViewVertex *)py_vv)->py_if0D.borrowed = 1;
+	((BPy_ViewVertex *)py_vv)->py_if0D.borrowed = true;
 	return py_vv;
 }
 
@@ -311,7 +311,7 @@ PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex& ntv)
 	((BPy_NonTVertex *)py_ntv)->ntv = &ntv;
 	((BPy_NonTVertex *)py_ntv)->py_vv.vv = ((BPy_NonTVertex *)py_ntv)->ntv;
 	((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.if0D = ((BPy_NonTVertex *)py_ntv)->ntv;
-	((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.borrowed = 1;
+	((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.borrowed = true;
 	return py_ntv;
 }
 
@@ -321,7 +321,7 @@ PyObject *BPy_TVertex_from_TVertex(TVertex& tv)
 	((BPy_TVertex *)py_tv)->tv = &tv;
 	((BPy_TVertex *)py_tv)->py_vv.vv = ((BPy_TVertex *)py_tv)->tv;
 	((BPy_TVertex *)py_tv)->py_vv.py_if0D.if0D = ((BPy_TVertex *)py_tv)->tv;
-	((BPy_TVertex *)py_tv)->py_vv.py_if0D.borrowed = 1;
+	((BPy_TVertex *)py_tv)->py_vv.py_if0D.borrowed = true;
 	return py_tv;
 }
 
@@ -337,7 +337,7 @@ PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge& ve)
 	PyObject *py_ve = ViewEdge_Type.tp_new(&ViewEdge_Type, 0, 0);
 	((BPy_ViewEdge *)py_ve)->ve = &ve;
 	((BPy_ViewEdge *)py_ve)->py_if1D.if1D = ((BPy_ViewEdge *)py_ve)->ve;
-	((BPy_ViewEdge *)py_ve)->py_if1D.borrowed = 1;
+	((BPy_ViewEdge *)py_ve)->py_if1D.borrowed = true;
 	return py_ve;
 }
 
@@ -347,7 +347,7 @@ PyObject *BPy_Chain_from_Chain(Chain& c)
 	((BPy_Chain *)py_c)->c = &c;
 	((BPy_Chain *)py_c)->py_c.c = ((BPy_Chain *)py_c)->c;
 	((BPy_Chain *)py_c)->py_c.py_if1D.if1D = ((BPy_Chain *)py_c)->c;
-	((BPy_Chain *)py_c)->py_c.py_if1D.borrowed = 1;
+	((BPy_Chain *)py_c)->py_c.py_if1D.borrowed = true;
 	return py_c;
 }
 
@@ -355,7 +355,7 @@ PyObject *BPy_SShape_from_SShape(SShape& ss)
 {
 	PyObject *py_ss = SShape_Type.tp_new(&SShape_Type, 0, 0);
 	((BPy_SShape *)py_ss)->ss = &ss;
-	((BPy_SShape *)py_ss)->borrowed = 1;
+	((BPy_SShape *)py_ss)->borrowed = true;
 	return py_ss;	
 }
 
@@ -363,7 +363,7 @@ PyObject *BPy_ViewShape_from_ViewShape(ViewShape& vs)
 {
 	PyObject *py_vs = ViewShape_Type.tp_new(&ViewShape_Type, 0, 0);
 	((BPy_ViewShape *)py_vs)->vs = &vs;
-	((BPy_ViewShape *)py_vs)->borrowed = 1;
+	((BPy_ViewShape *)py_vs)->borrowed = true;
 	((BPy_ViewShape *)py_vs)->py_ss = NULL;
 	return py_vs;
 }
@@ -389,7 +389,7 @@ PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint& cp)
 	PyObject *py_cp = CurvePoint_Type.tp_new(&CurvePoint_Type, 0, 0);
 	((BPy_CurvePoint *) py_cp)->cp = &cp;
 	((BPy_CurvePoint *) py_cp)->py_if0D.if0D = ((BPy_CurvePoint *)py_cp)->cp;
-	((BPy_CurvePoint *) py_cp)->py_if0D.borrowed = 1;
+	((BPy_CurvePoint *) py_cp)->py_if0D.borrowed = true;
 	return py_cp;
 }
 
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 0861952..9355c9c 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -103,7 +103,7 @@ static int Interface0D_init(BPy_Interface0D *self, PyObject *args, PyObject *kwd
 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
 		return -1;
 	self->if0D = new Interface0D();
-	self->borrowed = 0;
+	self->borrowed = false;
 	return 0;
 }
 
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.h b/source/blender/freestyle/intern/python/BPy_Interface0D.h
index b8a4a6b..ec1a6f1 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.h
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.h
@@ -47,7 +47,7 @@ extern PyTypeObject Interface0D_Type;
 typedef struct {
 	PyObject_HEAD
 	Interface0D *if0D;
-	int borrowed; /* non-zero if *if0D is a borrowed object */
+	bool borrowed; /* true if *if0D is a borrowed object */
 } BPy_Interface0D;
 
 /*---------------------------Python BPy_Interface0D visible prototypes-----------*/
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index a4bcea8..0fc3ec4 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -113,7 +113,7 @@ static int Interface1D_init(BPy_Interface1D *self, PyObject *args, PyObject *kwd
 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
 		return -1;
 	self->if1D = new Interface1D();
-	self->borrowed = 0;
+	self->borrowed = false;
 	return 0;
 }
 
@@ -141,7 +141,7 @@ PyDoc_STRVAR(Interface1D_vertices_begin_doc,
 static PyObject * Interface1D_vertices_begin(BPy_Interface1D *self)
 {
 	Interface0DIterator if0D_it(self->if1D->verticesBegin());
-	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
+	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
 }
 
 PyDoc_STRVAR(Interface1D_vertices_end_doc,
@@ -156,7 +156,7 @@ PyDoc_STRVAR(Interface1D_vertices_end_doc,
 static PyObject * Interface1D_vertices_end(BPy_Interface1D *self)
 {
 	Interface0DIterator if0D_it(self->if1D->verticesEnd());
-	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 1);
+	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true);
 }
 
 PyDoc_STRVAR(Interface1D_points_begin_doc,
@@ -181,7 +181,7 @@ static PyObject * Interface1D_points_begin(BPy_Interface1D *self, PyObject *args
 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
 		return NULL;
 	Interface0DIterator if0D_it(self->if1D->pointsBegin(f));
-	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
+	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, false);
 }
 
 PyDoc_STRVAR(Interface1D_points_end_doc,
@@ -206,7 +206,7 @@ static PyObject * Interface1D_points_end(BPy_Interface1D *self, PyObject *args,
 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|f", (char **)kwlist, &f))
 		return NULL;
 	Interface0DIterator if0D_it(self->if1D->pointsEnd(f));
-	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 1);
+	return BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, true);
 }
 
 static PyMethodDef BPy_Interface1D_methods[] = {
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.h b/source/blender/freestyle/intern/python/BPy_Interface1D.h
index 17c0752..0c731bb 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.h
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.h
@@ -47,7 +47,7 @@ extern PyTypeObject Interface1D_Type;
 typedef struct {
 	PyObject_HEAD
 	Interface1D *

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list