Integrated Freestyle to rendering pipeline
[blender.git] / release / scripts / scripttemplate_gamelogic_basic.py
1 #!BPY
2 """
3 Name: 'GameLogic Template'
4 Blender: 249
5 Group: 'ScriptTemplate'
6 Tooltip: 'Basic template for new game logic scripts'
7 """
8
9 from Blender import Window
10 import bpy
11
12 script_data = \
13 '''
14 def main():
15
16         cont = GameLogic.getCurrentController()
17         own = cont.owner
18         
19         sens = cont.sensors['mySensor']
20         actu = cont.actuators['myActuator']
21         
22         if sens.positive:
23                 cont.activate(actu)
24         else:
25                 cont.deactivate(actu)
26
27 main()
28 '''
29
30 new_text = bpy.data.texts.new('gamelogic_simple.py')
31 new_text.write(script_data)
32 bpy.data.texts.active = new_text
33 Window.RedrawAll()