From 2b46b624f8f292f17efe46bb8cbc8d5b31f7efbf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Apr 2006 15:37:32 +0000 Subject: [PATCH] Error in accessing the listbase needed to use BLI_countlist(&lb) rather then BLI_countlist(lb) fixed, thanks jms for the hint. --- source/blender/python/api2_2x/Object.c | 2 +- source/blender/python/api2_2x/doc/Object.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index b9f9f18d1e2..234d78cebd6 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -3192,7 +3192,7 @@ static PyObject *Object_getDupliObjects ( BPy_Object * self ) } if(ob->type!=OB_MBALL) { lb= object_duplilist(sce, ob); - dupli_objects_list= PyList_New( BLI_countlist(lb)-1 ); + dupli_objects_list= PyList_New( BLI_countlist(&lb) ); if( !dupli_objects_list ) return EXPP_ReturnPyObjError( PyExc_RuntimeError, "PyList_New() failed" ); diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py index 270c1f2873f..4c81862900b 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -277,7 +277,7 @@ class Object: from Blender import Object, Scene, Mathutils ob= Object.Get('Cube') - dupe_obs= ob.getDupliObjects() + dupe_obs= ob.DupObjects scn= Scene.GetCurrent() for dupe_ob, dupe_matrix in dupe_obs: print dupe_ob.name