[Bf-python] Object.DupObjects error : the correction, the return

jean-michel soler jmsoler at free.fr
Tue Apr 18 17:32:54 CEST 2006


jean-michel soler a écrit :

> 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')

Just to say that, in the API doc  this line :

> dupe_obs= ob.getDupObjects ()

does not work at all and should be :
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
>
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
>





More information about the Bf-python mailing list