Extending Blender by creating a new type of object

Hi everyone,

I’m evaluating Blender for using it as my level editor. I was wondering if you could use the Python API to create new types of objects and edit them via the property panel.

Does anyone know if this is feasible in Python? Do I have to modify the native CPP code?

People make bolts, arches and stuff like that with python scripts so it is quite possible.

I think he means “objects” in the programming sense … as in object oriented programming …

I don’t think the current 2.4XX Python API will let you do this, but Python API for 2.5 forwards sounds like it will without touching the source code …

You might look here http://www.graphicall.org/ftp/ideasman42/html/ or http://www.zoo-logique.org/3D.Blender/scripts_python/API/ for more information or download a 2.5 build and open up an interactive python console and use the “print dir()” command for internal documentation .

Since with the new API you can create new tools and build custom UIs that seamlessly integrates with the overall UI, I would assume you should be able to create new object types and the interface with just Python .

… but I’m no programmer, so you might go to the developer section at Blender.org for more technical specifics on all this … or better yet PM ideasman42 since he is the one writing the new API …

Thanks Vertex Pusher! I’ll have a look at API 2.5.

Perhaps you are looking for parametric objects?


I’m actually looking for a way to create new types of objects that would be used by my game engine (like ennemy spawner / trigger). I want to be able to place them in Blender, edit their properties and save them in the blend file (I actually don’t need them to interact with blender). Then using a python script, I export those extra data to my own game engine.

It sounds like I could do it using the upcoming 2.5 Python API.

I see… You can create your own property-editing GUI inside Blender (Blender.Draw) or outside Blender (TkInter, …) . Or you can use Spyder, and have your GUI auto-generated for you from a list of properties.