[Bf-python] Re: blender 2.40 python docs

Toni Alatalo antont at kyperjokki.fi
Mon Nov 14 16:56:38 CET 2005


some more rambling and thinking-aloud about the api,

On Monday 14 November 2005 16:05, Ken Hughes wrote:
> > thinking: where do we put Fluidsim?
> I don't think anybody has put it anywhere yet :-)

that 'put' tried to be in future, i guess i should have said 'will put'

> It does bother me that the softbody and particle interaction API are
> different from the particle API.  I was wondering if putting them in the
> object type was a conscious decision as the future direction of the API.

hm. looking at the softbody methods in Object, i can sort of see where that is 
coming from .. in a way they are properties that the object has, but 
considering that there is now already two different similar such simulation 
systems: softbodies and fluids, i guess it is bad to pollute Object with the 
details of both (and in the future perhaps more) of them. then again i dont 
know what would be a good design either. one i guess would be to have 
object.softbody, object.fluidsim etc. default to None, and point to 
appropriate objects with the settings if those are enabled .. that does not 
feel too great either, but would be an improvement, no?

particles .. i dont really know what they are yet in an API sense. i dont 
think they are an effect. i think they are particles :) for example here at 
Orange we are now using particle systems to create hair, 
http://orange.blender.org/blog/get-a-haircut .. and the object that is used 
to configure the creation of it .. is it more like that object is a control 
object, that the particle system uses? for example in this system that Matt 
made, 
http://orange.blender.org/wp-content/themes/orange/images/blog/braids.jpg the 
Object is a actually just a particle emitter that is at one end of the hair, 
and then there are several guide curves to shape the particle system. so in a 
way that could be done like this:
p = ParticleSystem()
p.emitter = hairstart
p.guides.append(curve1)
p.guides.append(curve2)
p.guides.append(curve3)

.. except that in Blender those guides actually are not directly connected to 
the particle system at all, but are just general fields 'in the air' that can 
be used to give shape .. and layers are abused to define which particle 
systems are affected by which deflectors. perhaps that should be changed in 
Blender itself, in which case that api draft might make sense :)

in any case, this does seem a quite awkward:
Object.buildParts(): Recomputes the particle system. This method only applies 
to an Object of the type Effect.

i guess in an elegant world, the type of an object implies what attributes and 
methods it has .. having special types, in this case so-called Effects, as 
the same type as other objects (like Mesh), but with different 
functionality, .. uh

btw, besides the removed wave etc. effects that Ken mentioned, there is still 
the good old Build effect (was reminded now when reading DNA_effect_types.h)

> Ken

~Toni



More information about the Bf-python mailing list