tabs to spaces, remove trailing white space. (apart of pep8)
[blender-staging.git] / release / scripts / ui / space_logic.py
1 import bpy
2
3 class LOGIC_PT_properties(bpy.types.Panel):
4     bl_space_type = 'LOGIC_EDITOR'
5     bl_region_type = 'UI'
6     bl_label = "Properties"
7
8     def poll(self, context):
9         ob = context.active_object
10         return ob and ob.game
11
12     def draw(self, context):
13         layout = self.layout
14
15         ob = context.active_object
16         game = ob.game
17
18         layout.itemO("object.game_property_new", text="Add Game Property")
19
20         for i, prop in enumerate(game.properties):
21
22             row = layout.row(align=True)
23             row.itemR(prop, "name", text="")
24             row.itemR(prop, "type", text="")
25             row.itemR(prop, "value", text="", toggle=True) # we dont care about the type. rna will display correctly
26             row.itemR(prop, "debug", text="", toggle=True, icon='ICON_INFO')
27             row.item_intO("object.game_property_remove", "index", i, text="", icon='ICON_X')
28
29 bpy.types.register(LOGIC_PT_properties)