[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x Object.c blender/source/blender/python/api2_2x/doc Object.py

Campbell Barton cbarton at metavr.com
Fri Dec 30 23:34:43 CET 2005

Stephen Swaney wrote:
> On Fri, Dec 30, 2005 at 03:12:18PM +0100, Matt Ebb wrote:
>> On Dec 30, 2005, at 2:32 PM, Alexander Ewering wrote:
>>> I'm not sure this makes much sense as it is. Making the working of  
>>> python >scripts depend on user preferences seems like an awkward idea to me.
>> I presume you can always do it the 'old way' though i.e. manually  
>> copying data around. It sounds good to me to have these Blender  
>> interface functions wrapped though - it seems to be a step along the  
>> way to making it work as a nice 'macro' language, which I'd  
>> personally probably use for automating things, rather than like  
>> purely running 'plugin' scripts.
> The results from running a script should NOT depend on the user
> preferences.
> I agree with Matt that packaging up Blender functions is a good thing.
> In fact, it is one of the next big steps for BPy.  However, the
> correct way to do it is to factor out the code so it can be effectively
> called from a script.
> There are some other issues with the code as-is, but we will save that
> discussion for the bpy list.

About the cvs freeze, thaught it was 1 week from 2.4, this would be on 
the tail end of 1 week.. fair point though, can remove if you want.

As for the exact functionality. I could make it work the same way all 
the time, not dependant on user preferences, agreed that would be ideal.

At the moment the closest python equivilent to linked duplicate 1 object 
looks like this, and its still missing a few things-

def linkedCopy(ob): # a bit like Alt+D
    scn = Scene.getCurrent()
    type = ob.getType()
    newOb = Object.New(type)
    if type != 'Empty':
    # Copy other attributes.
    newOb.Layer = ob.Layer
    return newOb

Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241

More information about the Bf-committers mailing list