I want to develop models of spaceships and planets using blender and store them as one .blend file. Then I want to code the game outside of blender in plain python using IDLE and “import Blender” so to say as module to get access to the blender files. When finished programming, I want to start the python program without starting blender.
Is this possible or do I have to code inside Blender !?
And if it must be done in blender:
a) how can I instantiate dynamically objects (i.e. generate new spaceships during runtime then) ?
b) how do I extend the blender embedded python language (e.g. extending it with own network module, VTK module, wxPython module, numeric module etc.) ?
For example - is this API script only startable as a standalone python program ?
scene = Blender.Scene.getCurrent () # get the current scene
ob = Blender.Object.New (‘Camera’) # make camera object
cam = Blender.Camera.New (‘ortho’) # make ortho camera data object
ob.link (cam) # link camera data with the object
scene.link (ob) # link the object into the scene
ob.setLocation (0.0, -5.0, 1.0) # position the object in the scene
Blender.Redraw() # redraw the scene to show the updates.