text: I've written this little script which lets you move the active object around with console commands, to test out the capabilities of the Python API.
  However, my only problem is, that it only appends changes after the script has terminated, while I want something like an "interactive mode". I want to develop an addon that lets you use a WiiMote to capture 3D movement which can be used for animations, or just moving objects around (and of course it would be something constantly running and looking for input).
  Code: Select all
  import bpy ao = bpy.context.active_object s = '' while s != 'done': s = input('?:') if s == 'x+': ao.location.x += 1 elif s == 'x-': ao.location.x -= 1 elif s == 'y+': ao.location.y += 1 elif s == 'y-': ao.location.y -= 1 elif s == 'z+': ao.location.z += 1 elif s == 'z-': ao.location.z -= 1 elif s == 'reset': ao.location = [0, 0, 0]
  Any ideas?