[Bf-python] Re: BlendIt / friendly BPython API

Toni Alatalo antont at kyperjokki.fi
Fri Oct 21 13:25:15 CEST 2005


as a little intro to others: Theo has been working for more than a year now on 
a very sophisticated wrapper to BPython in his Blendit project, and published 
it at the conference last week. I'm looking into using it in Orange, to speed 
up the script development time and make them easier to modify (also for the 
other project members). it is currently available at 
http://download.blender.org/projects/blendit/ but will be started as a 
project with cvs etc. in projects.blender.org .. perhaps later today.

earlier we exchanged some e-mails about the API, and yesterday i happened to 
work on duplication which was one of the problem points he mentioned then, 
and this is just a reply to tell him about the method that seems to work:

On Friday 16 September 2005 22:08, Theo wrote:
>      no way for simple duplicates

there is Object.link() that makes an object reuse the data of some other 
object, which i guess is similar to what alt-d and i suppose Dupliverts do 
too..? this is how i used it with Ken Hughes' new Mesh module in 2.4, to 
reimplement the duplivert functionality: (attached is the full source that i 
started yesterday, when am trying to add random variation to positioning and 
sizing of the duplicates .. pretty sucky still but a beginning)

mesh = Mesh.New() #Mesh.Get(target.getData(name_only=True))
mesh.getFromObject(target.name)
mesh.transform(target.matrix) #to have the worldspace coords of the vertices

for v in mesh.verts:
	new = Object.New('Mesh', 'gen')
	source = random.choice(junks)
	new.link(source.data)
	new.loc = v.co
	scene.link(new)

On Friday 16 September 2005 22:08, you wrote:
> On 16-sep-2005, at 16:29, antont at kyperjokki.fi wrote:
> > if there are pressing problems with the Blender API (i'm sure you
> > have had
> > many frustrations..), please send in bug reports and requests.
> > there seems to
> > be a good team working on it now, and i'm also working full-time on
> > using it,
> > and fixing things when needed.
>
> hm, yes a lot of frustations;
> most important is the lack of consistency and completeness
> compared with the facilities within the user-interface:
> 1. a lot of things are missing like
>      no constraint object, only the old way
>      no way for simple duplicates
>      no way to mimic effect of many buttons
>      etc, ...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: junkster.py
Type: application/x-python
Size: 880 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20051021/3f2f64e0/attachment.bin>


More information about the Bf-python mailing list