[Bf-python] Object.DupObjects error : the correction
jean-michel soler
jmsoler at free.fr
Tue Apr 18 17:27:58 CEST 2006
In Objetc.c
The line 3195 :
dupli_objects_list= PyList_New( BLI_countlist(lb)-1 );
should be :
dupli_objects_list= PyList_New( BLI_countlist(lb) );
Compiled on win32 with MSVC 7.0 + Scons, and tested .
this :
import Blender
from Blender import Object, Scene, Mathutils
ob= Object.Get('Cube')
dupe_obs= ob.DupObjects
scn= Scene.GetCurrent()
for dupe_ob, dupe_matrix in dupe_obs:
print dupe_ob.name
empty_ob= Object.New('Empty')
scn.link(empty_ob)
empty_ob.setMatrix(dupe_matrix)
Blender.Redraw()
works fine now .
Cheers, jms
More information about the Bf-python
mailing list