diff options
Diffstat (limited to 'release/ui/space_logic.py')
-rw-r--r-- | release/ui/space_logic.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/release/ui/space_logic.py b/release/ui/space_logic.py index f862f6e2667..bb7f22c7c5e 100644 --- a/release/ui/space_logic.py +++ b/release/ui/space_logic.py @@ -75,7 +75,7 @@ class LOGIC_PT_collision_bounds(bpy.types.Panel): def draw(self, context): layout = self.layout - ob = context.scene.objects[0] + ob = context.active_object game = ob.game flow = layout.column_flow() @@ -84,5 +84,28 @@ class LOGIC_PT_collision_bounds(bpy.types.Panel): flow.itemR(game, "collision_compound") flow.itemR(game, "collision_margin") +class LOGIC_PT_properties(bpy.types.Panel): + __space_type__ = "LOGIC_EDITOR" + __region_type__ = "UI" + __label__ = "Properties" + + def poll(self, context): + ob = context.active_object + return ob and ob.game + + def draw(self, context): + layout = self.layout + + ob = context.active_object + game = ob.game + + for prop in game.properties: + flow = layout.row() + flow.itemR(prop, "name", text="") + flow.itemR(prop, "type", text="") + flow.itemR(prop, "value", text="") # we dont care about the type. rna will display correctly + flow.itemR(prop, "debug") + bpy.types.register(LOGIC_PT_physics) bpy.types.register(LOGIC_PT_collision_bounds) +bpy.types.register(LOGIC_PT_properties) |