[Bf-python] bpy.libraries modules

Campbell Barton cbarton at metavr.com
Mon Mar 19 19:00:28 CET 2007


Id say go ahead, bpy is experimental anyhow.
then we can test and review.

Ken Hughes wrote:
> 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
>>>
>>
>>
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
> 


-- 
See MetaVR Visuals Used at the Combat Studies Institute
http://www.metavr.com/casestudies/baghdadviews.html

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-python mailing list