[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28474] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28464 :28473
Campbell Barton
ideasman42 at gmail.com
Tue Apr 27 23:04:05 CEST 2010
Revision: 28474
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28474
Author: campbellbarton
Date: 2010-04-27 23:04:05 +0200 (Tue, 27 Apr 2010)
Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28464:28473
Modified Paths:
--------------
branches/render25/intern/guardedalloc/intern/mallocn.c
branches/render25/release/scripts/templates/operator_modal_draw.py
branches/render25/source/blender/python/generic/mathutils.c
branches/render25/source/blender/python/generic/mathutils.h
branches/render25/source/blender/python/generic/mathutils_matrix.c
branches/render25/source/blender/python/intern/bpy_rna.c
branches/render25/source/creator/creator.c
branches/render25/source/gameengine/Ketsji/KX_GameObject.cpp
branches/render25/source/gameengine/Ketsji/KX_ObjectActuator.cpp
Modified: branches/render25/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/render25/intern/guardedalloc/intern/mallocn.c 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/intern/guardedalloc/intern/mallocn.c 2010-04-27 21:04:05 UTC (rev 28474)
@@ -82,7 +82,11 @@
/* note: keep this struct aligned (e.g., irix/gcc) - Hos */
typedef struct MemHead {
int tag1;
- unsigned int len;
+#if defined(WIN64)
+ unsigned long long len;
+#else
+ unsigned long len;
+#endif
struct MemHead *next,*prev;
const char * name;
const char * nextname;
Modified: branches/render25/release/scripts/templates/operator_modal_draw.py
===================================================================
--- branches/render25/release/scripts/templates/operator_modal_draw.py 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/release/scripts/templates/operator_modal_draw.py 2010-04-27 21:04:05 UTC (rev 28474)
@@ -4,10 +4,12 @@
def draw_callback_px(self, context):
print("mouse points", len(self.mouse_path))
+ font_id = 0 # XXX, need to find out how best to get this.
+
# draw some text
- blf.position(15, 30, 0)
- blf.size(20, 72)
- blf.draw("Hello Word " + str(len(self.mouse_path)))
+ blf.position(font_id, 15, 30, 0)
+ blf.size(font_id, 20, 72)
+ blf.draw(font_id, "Hello Word " + str(len(self.mouse_path)))
# 50% alpha, 2 pixel width line
bgl.glEnable(bgl.GL_BLEND)
Modified: branches/render25/source/blender/python/generic/mathutils.c
===================================================================
--- branches/render25/source/blender/python/generic/mathutils.c 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/source/blender/python/generic/mathutils.c 2010-04-27 21:04:05 UTC (rev 28474)
@@ -646,7 +646,7 @@
int _BaseMathObject_ReadCallback(BaseMathObject *self)
{
Mathutils_Callback *cb= mathutils_callbacks[self->cb_type];
- if(cb->get(self, self->cb_subtype, self->data))
+ if(cb->get(self, self->cb_subtype))
return 1;
PyErr_Format(PyExc_SystemError, "%s user has become invalid", Py_TYPE(self)->tp_name);
@@ -656,7 +656,7 @@
int _BaseMathObject_WriteCallback(BaseMathObject *self)
{
Mathutils_Callback *cb= mathutils_callbacks[self->cb_type];
- if(cb->set(self, self->cb_subtype, self->data))
+ if(cb->set(self, self->cb_subtype))
return 1;
PyErr_Format(PyExc_SystemError, "%s user has become invalid", Py_TYPE(self)->tp_name);
@@ -666,7 +666,7 @@
int _BaseMathObject_ReadIndexCallback(BaseMathObject *self, int index)
{
Mathutils_Callback *cb= mathutils_callbacks[self->cb_type];
- if(cb->get_index(self, self->cb_subtype, self->data, index))
+ if(cb->get_index(self, self->cb_subtype, index))
return 1;
PyErr_Format(PyExc_SystemError, "%s user has become invalid", Py_TYPE(self)->tp_name);
@@ -676,7 +676,7 @@
int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
{
Mathutils_Callback *cb= mathutils_callbacks[self->cb_type];
- if(cb->set_index(self, self->cb_subtype, self->data, index))
+ if(cb->set_index(self, self->cb_subtype, index))
return 1;
PyErr_Format(PyExc_SystemError, "%s user has become invalid", Py_TYPE(self)->tp_name);
Modified: branches/render25/source/blender/python/generic/mathutils.h
===================================================================
--- branches/render25/source/blender/python/generic/mathutils.h 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/source/blender/python/generic/mathutils.h 2010-04-27 21:04:05 UTC (rev 28474)
@@ -89,10 +89,10 @@
typedef struct Mathutils_Callback Mathutils_Callback;
typedef int (*BaseMathCheckFunc)(BaseMathObject *); /* checks the user is still valid */
-typedef int (*BaseMathGetFunc)(BaseMathObject *, int, float *); /* gets the vector from the user */
-typedef int (*BaseMathSetFunc)(BaseMathObject *, int, float *); /* sets the users vector values once the vector is modified */
-typedef int (*BaseMathGetIndexFunc)(BaseMathObject *, int, float *, int); /* same as above but only for an index */
-typedef int (*BaseMathSetIndexFunc)(BaseMathObject *, int, float *, int); /* same as above but only for an index */
+typedef int (*BaseMathGetFunc)(BaseMathObject *, int); /* gets the vector from the user */
+typedef int (*BaseMathSetFunc)(BaseMathObject *, int); /* sets the users vector values once the vector is modified */
+typedef int (*BaseMathGetIndexFunc)(BaseMathObject *, int, int); /* same as above but only for an index */
+typedef int (*BaseMathSetIndexFunc)(BaseMathObject *, int, int); /* same as above but only for an index */
struct Mathutils_Callback {
BaseMathCheckFunc check;
Modified: branches/render25/source/blender/python/generic/mathutils_matrix.c
===================================================================
--- branches/render25/source/blender/python/generic/mathutils_matrix.c 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/source/blender/python/generic/mathutils_matrix.c 2010-04-27 21:04:05 UTC (rev 28474)
@@ -37,60 +37,60 @@
/* matrix vector callbacks */
int mathutils_matrix_vector_cb_index= -1;
-static int mathutils_matrix_vector_check(BaseMathObject *self_p)
+static int mathutils_matrix_vector_check(BaseMathObject *bmo)
{
- MatrixObject *self= (MatrixObject *)self_p;
+ MatrixObject *self= (MatrixObject *)bmo->cb_user;
return BaseMath_ReadCallback(self);
}
-static int mathutils_matrix_vector_get(BaseMathObject *self_p, int subtype, float *vec_from)
+static int mathutils_matrix_vector_get(BaseMathObject *bmo, int subtype)
{
- MatrixObject *self= (MatrixObject *)self_p;
+ MatrixObject *self= (MatrixObject *)bmo->cb_user;
int i;
if(!BaseMath_ReadCallback(self))
return 0;
- for(i=0; i<self->colSize; i++)
- vec_from[i]= self->matrix[subtype][i];
+ for(i=0; i < self->colSize; i++)
+ bmo->data[i]= self->matrix[subtype][i];
return 1;
}
-static int mathutils_matrix_vector_set(BaseMathObject *self_p, int subtype, float *vec_to)
+static int mathutils_matrix_vector_set(BaseMathObject *bmo, int subtype)
{
- MatrixObject *self= (MatrixObject *)self_p;
+ MatrixObject *self= (MatrixObject *)bmo->cb_user;
int i;
if(!BaseMath_ReadCallback(self))
return 0;
- for(i=0; i<self->colSize; i++)
- self->matrix[subtype][i]= vec_to[i];
+ for(i=0; i < self->colSize; i++)
+ self->matrix[subtype][i]= bmo->data[i];
BaseMath_WriteCallback(self);
return 1;
}
-static int mathutils_matrix_vector_get_index(BaseMathObject *self_p, int subtype, float *vec_from, int index)
+static int mathutils_matrix_vector_get_index(BaseMathObject *bmo, int subtype, int index)
{
- MatrixObject *self= (MatrixObject *)self_p;
+ MatrixObject *self= (MatrixObject *)bmo->cb_user;
if(!BaseMath_ReadCallback(self))
return 0;
- vec_from[index]= self->matrix[subtype][index];
+ bmo->data[index]= self->matrix[subtype][index];
return 1;
}
-static int mathutils_matrix_vector_set_index(BaseMathObject *self_p, int subtype, float *vec_to, int index)
+static int mathutils_matrix_vector_set_index(BaseMathObject *bmo, int subtype, int index)
{
- MatrixObject *self= (MatrixObject*)self_p;
+ MatrixObject *self= (MatrixObject *)bmo->cb_user;
if(!BaseMath_ReadCallback(self))
return 0;
- self->matrix[subtype][index]= vec_to[index];
+ self->matrix[subtype][index]= bmo->data[index];
BaseMath_WriteCallback(self);
return 1;
Modified: branches/render25/source/blender/python/intern/bpy_rna.c
===================================================================
--- branches/render25/source/blender/python/intern/bpy_rna.c 2010-04-27 21:01:24 UTC (rev 28473)
+++ branches/render25/source/blender/python/intern/bpy_rna.c 2010-04-27 21:04:05 UTC (rev 28474)
@@ -74,13 +74,13 @@
return self->prop ? 1:0;
}
-static int mathutils_rna_vector_get(BaseMathObject *bmo, int subtype, float *vec_from)
+static int mathutils_rna_vector_get(BaseMathObject *bmo, int subtype)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
if(self->prop==NULL)
return 0;
- RNA_property_float_get_array(&self->ptr, self->prop, vec_from);
+ RNA_property_float_get_array(&self->ptr, self->prop, bmo->data);
/* Euler order exception */
if(subtype==MATHUTILS_CB_SUBTYPE_EUL) {
@@ -92,7 +92,7 @@
return 1;
}
-static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype, float *vec_to)
+static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
float min, max;
@@ -104,11 +104,11 @@
if(min != FLT_MIN || max != FLT_MAX) {
int i, len= RNA_property_array_length(&self->ptr, self->prop);
for(i=0; i<len; i++) {
- CLAMP(vec_to[i], min, max);
+ CLAMP(bmo->data[i], min, max);
}
}
- RNA_property_float_set_array(&self->ptr, self->prop, vec_to);
+ RNA_property_float_set_array(&self->ptr, self->prop, bmo->data);
RNA_property_update(BPy_GetContext(), &self->ptr, self->prop);
/* Euler order exception */
@@ -124,26 +124,26 @@
return 1;
}
-static int mathutils_rna_vector_get_index(BaseMathObject *bmo, int subtype, float *vec_from, int index)
+static int mathutils_rna_vector_get_index(BaseMathObject *bmo, int subtype, int index)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
if(self->prop==NULL)
return 0;
- vec_from[index]= RNA_property_float_get_index(&self->ptr, self->prop, index);
+ bmo->data[index]= RNA_property_float_get_index(&self->ptr, self->prop, index);
return 1;
}
-static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int subtype, float *vec_to, int index)
+static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int subtype, int index)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
if(self->prop==NULL)
return 0;
- RNA_property_float_clamp(&self->ptr, self->prop, &vec_to[index]);
- RNA_property_float_set_index(&self->ptr, self->prop, index, vec_to[index]);
+ RNA_property_float_clamp(&self->ptr, self->prop, &bmo->data[index]);
+ RNA_property_float_set_index(&self->ptr, self->prop, index, bmo->data[index]);
RNA_property_update(BPy_GetContext(), &self->ptr, self->prop);
return 1;
}
@@ -160,35 +160,35 @@
/* bpyrna matrix callbacks */
static int mathutils_rna_matrix_cb_index= -1; /* index for our callbacks */
-static int mathutils_rna_matrix_get(BaseMathObject *bmo, int subtype, float *mat_from)
+static int mathutils_rna_matrix_get(BaseMathObject *bmo, int subtype)
{
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list