[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60126] trunk/blender/source/blender: minor changes needed for building standalone mathutils.
Campbell Barton
ideasman42 at gmail.com
Sat Sep 14 02:30:57 CEST 2013
Revision: 60126
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60126
Author: campbellbarton
Date: 2013-09-14 00:30:56 +0000 (Sat, 14 Sep 2013)
Log Message:
-----------
minor changes needed for building standalone mathutils.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/math_geom.c
trunk/blender/source/blender/python/mathutils/mathutils.c
trunk/blender/source/blender/python/mathutils/mathutils_Vector.c
trunk/blender/source/blender/python/mathutils/mathutils_geometry.c
Modified: trunk/blender/source/blender/blenlib/intern/math_geom.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_geom.c 2013-09-14 00:01:05 UTC (rev 60125)
+++ trunk/blender/source/blender/blenlib/intern/math_geom.c 2013-09-14 00:30:56 UTC (rev 60126)
@@ -1610,7 +1610,7 @@
tymax = (bbox[1 - data->sign[1]][1] - data->ray_start[1]) * data->ray_inv_dir[1];
if ((tmin > tymax) || (tymin > tmax))
- return FALSE;
+ return false;
if (tymin > tmin)
tmin = tymin;
@@ -1622,7 +1622,7 @@
tzmax = (bbox[1 - data->sign[2]][2] - data->ray_start[2]) * data->ray_inv_dir[2];
if ((tmin > tzmax) || (tzmin > tmax))
- return FALSE;
+ return false;
if (tzmin > tmin)
tmin = tzmin;
@@ -1634,7 +1634,7 @@
if (tmin_out)
(*tmin_out) = tmin;
- return TRUE;
+ return true;
}
/* find closest point to p on line through (l1, l2) and return lambda,
Modified: trunk/blender/source/blender/python/mathutils/mathutils.c
===================================================================
--- trunk/blender/source/blender/python/mathutils/mathutils.c 2013-09-14 00:01:05 UTC (rev 60125)
+++ trunk/blender/source/blender/python/mathutils/mathutils.c 2013-09-14 00:30:56 UTC (rev 60126)
@@ -510,10 +510,12 @@
PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
Py_INCREF(submodule);
+#ifndef MATH_STANDALONE
/* Noise submodule */
PyModule_AddObject(mod, "noise", (submodule = PyInit_mathutils_noise()));
PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
Py_INCREF(submodule);
+#endif
mathutils_matrix_row_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_row_cb);
mathutils_matrix_col_cb_index = Mathutils_RegisterCallback(&mathutils_matrix_col_cb);
Modified: trunk/blender/source/blender/python/mathutils/mathutils_Vector.c
===================================================================
--- trunk/blender/source/blender/python/mathutils/mathutils_Vector.c 2013-09-14 00:01:05 UTC (rev 60125)
+++ trunk/blender/source/blender/python/mathutils/mathutils_Vector.c 2013-09-14 00:30:56 UTC (rev 60126)
@@ -1286,7 +1286,7 @@
static PyObject *Vector_item(VectorObject *self, int i)
{
- return vector_item_internal(self, i, FALSE);
+ return vector_item_internal(self, i, false);
}
/* sequence accessor (set): vector[index] = value */
static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value, const int is_attr)
@@ -1323,7 +1323,7 @@
static int Vector_ass_item(VectorObject *self, int i, PyObject *value)
{
- return vector_ass_item_internal(self, i, value, FALSE);
+ return vector_ass_item_internal(self, i, value, false);
}
/* sequence slice (get): vector[a:b] */
@@ -2086,12 +2086,12 @@
static PyObject *Vector_axis_get(VectorObject *self, void *type)
{
- return vector_item_internal(self, GET_INT_FROM_POINTER(type), TRUE);
+ return vector_item_internal(self, GET_INT_FROM_POINTER(type), true);
}
static int Vector_axis_set(VectorObject *self, PyObject *value, void *type)
{
- return vector_ass_item_internal(self, GET_INT_FROM_POINTER(type), value, TRUE);
+ return vector_ass_item_internal(self, GET_INT_FROM_POINTER(type), value, true);
}
/* vector.length */
Modified: trunk/blender/source/blender/python/mathutils/mathutils_geometry.c
===================================================================
--- trunk/blender/source/blender/python/mathutils/mathutils_geometry.c 2013-09-14 00:01:05 UTC (rev 60125)
+++ trunk/blender/source/blender/python/mathutils/mathutils_geometry.c 2013-09-14 00:30:56 UTC (rev 60126)
@@ -690,7 +690,7 @@
{
VectorObject *line_a, *line_b, *sphere_co;
float sphere_radius;
- int clip = TRUE;
+ int clip = true;
float isect_a[3];
float isect_b[3];
@@ -726,12 +726,12 @@
switch (isect_line_sphere_v3(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
- if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
use_b = false;
break;
case 2:
- if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
- if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = FALSE;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
+ if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = false;
break;
default:
use_a = false;
@@ -771,7 +771,7 @@
{
VectorObject *line_a, *line_b, *sphere_co;
float sphere_radius;
- int clip = TRUE;
+ int clip = true;
float isect_a[2];
float isect_b[2];
@@ -801,7 +801,7 @@
switch (isect_line_sphere_v2(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
if (!(!clip || (((lambda = line_point_factor_v2(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
- use_b = FALSE;
+ use_b = false;
break;
case 2:
if (!(!clip || (((lambda = line_point_factor_v2(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = false;
@@ -1155,7 +1155,7 @@
PyList_Append(py_verts, item);
Py_DECREF(item);
- planes_used[i] = planes_used[j] = planes_used[k] = TRUE;
+ planes_used[i] = planes_used[j] = planes_used[k] = true;
}
}
}
More information about the Bf-blender-cvs
mailing list