[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12314] trunk/blender/source/blender/ python/api2_2x: python api, slicing works differently on the 64bit ubuntu gutsy system, compared to the 32bit
Campbell Barton
cbarton at metavr.com
Sat Oct 20 22:24:10 CEST 2007
Revision: 12314
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12314
Author: campbellbarton
Date: 2007-10-20 22:24:09 +0200 (Sat, 20 Oct 2007)
Log Message:
-----------
python api, slicing works differently on the 64bit ubuntu gutsy system, compared to the 32bit
install.
face.uv[:] was returning a blank list. and making smart UV projection script fail.
On one system Python is giving the slice function positive values, whereas on the 64bit system its
passing negative which are then clamped to zero.
made mathutils types accept negative values for slicing. This is very odd because both systems are
running ubuntu gutsy with python 2.5
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/euler.c
trunk/blender/source/blender/python/api2_2x/quat.c
trunk/blender/source/blender/python/api2_2x/vector.c
Modified: trunk/blender/source/blender/python/api2_2x/euler.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/euler.c 2007-10-20 19:47:19 UTC (rev 12313)
+++ trunk/blender/source/blender/python/api2_2x/euler.c 2007-10-20 20:24:09 UTC (rev 12314)
@@ -347,6 +347,7 @@
int count;
CLAMP(begin, 0, 3);
+ if (end<0) end= 4+end;
CLAMP(end, 0, 3);
begin = MIN2(begin,end);
@@ -368,6 +369,7 @@
PyObject *e, *f;
CLAMP(begin, 0, 3);
+ if (end<0) end= 4+end;
CLAMP(end, 0, 3);
begin = MIN2(begin,end);
Modified: trunk/blender/source/blender/python/api2_2x/quat.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/quat.c 2007-10-20 19:47:19 UTC (rev 12313)
+++ trunk/blender/source/blender/python/api2_2x/quat.c 2007-10-20 20:24:09 UTC (rev 12314)
@@ -350,6 +350,7 @@
int count;
CLAMP(begin, 0, 4);
+ if (end<0) end= 5+end;
CLAMP(end, 0, 4);
begin = MIN2(begin,end);
@@ -371,6 +372,7 @@
PyObject *q, *f;
CLAMP(begin, 0, 4);
+ if (end<0) end= 5+end;
CLAMP(end, 0, 4);
begin = MIN2(begin,end);
Modified: trunk/blender/source/blender/python/api2_2x/vector.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/vector.c 2007-10-20 19:47:19 UTC (rev 12313)
+++ trunk/blender/source/blender/python/api2_2x/vector.c 2007-10-20 20:24:09 UTC (rev 12314)
@@ -359,6 +359,7 @@
int count;
CLAMP(begin, 0, self->size);
+ if (end<0) end= self->size+end+1;
CLAMP(end, 0, self->size);
begin = MIN2(begin,end);
@@ -380,6 +381,7 @@
PyObject *v;
CLAMP(begin, 0, self->size);
+ if (end<0) end= self->size+end+1;
CLAMP(end, 0, self->size);
begin = MIN2(begin,end);
More information about the Bf-blender-cvs
mailing list