[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x Group.c Scene.c

Ken Hughes khughes at pacific.edu
Mon Dec 11 19:00:35 CET 2006


Alexander Ewering wrote:
> 
> On Mon, 11 Dec 2006, Campbell Barton wrote:
> 
>>  renamed objects.add() and .remove() to .link() and .unlink() for 
>> scene and group objects to be less pythonic and more like blender.
>>  for scn.objects.new() a optional second argument can be used to 
>> spesify the name.
> 
> I assume that these functions are new in 2.43 and have not existed before?
> 
> Because otherwise, this change would break compatibility of all 
> pre-existing
> scripts ;)

We discussed this for quite a while yesterday in #blenderpython and 
these are features which are in CVS new to 2.43.  They will replace 
Object.New() eventually since it is an error-prone way to create 
objects, and fixing it might break other scripts (but we're trying to 
find a backward compatible way to do that, anyway).

FWIW, the new method lets you create a new object with data and add to 
the current scene in one line:

scene.getCurrent().objects.new(Mesh.New())

Ken


More information about the Bf-committers mailing list