[Bf-python] bpy.libraries modules

Ken Hughes khughes at pacific.edu
Mon Mar 19 18:52:24 CET 2007


Ok, implemented as an iterator (think it was simpler than implementing a 
list).

So does anyone have any objections to committing this to CVS?  Any more 
comments or suggestions?

Ken

Campbell Barton wrote:
> Hey Ken, this was my intention,
> iterators are probably ideal, though In this case a list may do.
> 
> Ken Hughes wrote:
>> One other thought:
>>
>> Should there be iterators for the various groups?  The current Library 
>> modules has Library.Datablocks(group), which get all datablock objects 
>> of the given 'group' available.  Otherwise I don't see how you can 
>> find out what things are there to be appended/linked.
>>
>> So something like:
>>
>> lib = bpy.libraries.load('//this.blend')
>> for ob in lib.objects:
>>   if ob[:6] == 'Camera':
>>     bpy.scenes.active.link(lib.objects.append(ob))
>>
>> Ken
>> _______________________________________________
>> 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