Registering New Object types like PowerUp,Armour, Spawns etc
Posted: Fri Feb 11, 2011 5:15 pm
Hi, Im trying to use blender as a level editor for my custom game engine.
Right now i have a python script that exports the spatial information of the meshes in the scene and load it in the engine.
However, i would also like to define custom objects in blender. i.e., from the Shift+A menu (or programatically), i want to place custom types of objects like PowerUp, Armour, along side other objects like Mesh, Curve etc
so from my export script when i do
I would like to see it returns 'PowerUp' (just like how i see 'Mesh' when i select a mesh)
As for the representation of these custom objects in the 3D view, i can draw something like a cube or a sphere in the screen.
Is this possible to do this using python? If not, can you point where I should look at to modify in C?
Thanks in advance.
Right now i have a python script that exports the spatial information of the meshes in the scene and load it in the engine.
However, i would also like to define custom objects in blender. i.e., from the Shift+A menu (or programatically), i want to place custom types of objects like PowerUp, Armour, along side other objects like Mesh, Curve etc
so from my export script when i do
Code: Select all
Scene.GetCurrent().objects.selected.type
As for the representation of these custom objects in the 3D view, i can draw something like a cube or a sphere in the screen.
Is this possible to do this using python? If not, can you point where I should look at to modify in C?
Thanks in advance.