[Bf-committers] Help on understanding blender structures
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Mar 19 17:38:52 CET 2007
Hi,
Miguel Torres Lima wrote:
> Hi,
>
> I'm having some trouble on understanding how the different blender
> structures are linked. I've been searching the web since morning for
> some kind of documentation on this subject and didn't find any yet.
> What I really need to know is if a scene structure is directly or
> indirectly linked to a View3D. If a Scene is indeed a layer, if an
> Object is an object, what kind of structure is linked to the Object's
> data field (void *data).
There is high-level documentation on this here:
http://www.blender.org/development/architecture/
It's all explained in the above document, but basically:
- Object.data points to a Mesh, Metaball, .. struct, depending on
Object.type.
- Object defines among other things the position, rotation, .. .
- Each Scene has a list of Base structs, that each link an Object to
that Scene.
- Base defines on which layer(s) the Object is in that Scene.
There's no direct link between a 3d view an a Scene. There are always
exactly 20 layers, and detecting if an object is visible in a 3d view is
done by doing a bitwise comparison between Base.lay & View3d.lay.
Brecht.
More information about the Bf-committers
mailing list