[Bf-committers] Re: [Crystalblend-main] Crystal Space, CrystalBlend, GameEngine: Discussion and Plans

Jean-Luc Peurière jlp at nerim.net
Mon Oct 17 22:33:19 CEST 2005


Le 17 oct. 05 à 20:34, Greg MacDonald a écrit :

> Hi,
>
> I'm currently trying to figure out a way to attach general  
> properties to all data blocks in Blender. Through these musings I  
> realized that in a reality where I am king of the universe, Blender  
> would have a database written using generalized base classes where  
> my generalized properties would live.
>
> Along those same lines, if all of Blender's structures were fully  
> extensible, and there existed a powerful 3D plug-in architecture,  
> then a game engine could actually be implemented as a seperate  
> project. And if someone wanted to make a different one, they could  
> do so.
>
> Aside from being a collosal effort, is there a reason this can't  
> happen? Legacy code?

Imho depends of what you call properties and where you want them. in  
the other thread you were speaking of adding them to blender core, CS  
discussions are about game engine, which is mostly already a separate  
world.

Jorrit was speaking of self-describing things, iow object model  
classes. This is bound to lead nowhere outside of game engine, as  
only this part follow an object model (others are written in C++ but  
in the end, fill core C structs like nurbana or the fluid sim. Even  
the python API will have to drop its info in C structs, and as such  
will loose any polymorphism or object related characteristic).
But for the game engine, this approach certainly fits in.

For core data structures, they are organized in a kind of database,  
in the sense that libdatas are split by kind and each can refer to  
others (see http://blender3d.org/cms/Blender_Architecture. 
336.0.html). So adding user datas is possible, provided we add a new  
libbdata kind to hold them. A pointer to this struct in each data  
block you want to add properties and you are done. However you have  
now to devise some kind of registration and provide way of edit and  
vizualise those. I oversimplify, but this part is certainly feasible  
provided it is well coded (we are touching very sensitive datas at  
the hearth)

  For generalized plugins, remember blender is C program and that it  
means hooks points, indirections and other no so nice to code things  
cleanly and fast.

lukep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.blender.org/pipermail/bf-committers/attachments/20051017/e3ae654c/attachment.html


More information about the Bf-committers mailing list