diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-05-16 20:28:50 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-05-16 20:28:50 +0400 |
commit | ce6e6112eb81892c8c179c8502ffa8ca17b57f46 (patch) | |
tree | a186a028663f6c75f61b0ae0187096431ba9657a /release | |
parent | 80de1162ee31acfe49209552549d918d44dffab1 (diff) |
Logic UI: copy logic operator (old Ctrl+C) + add logics (shift+a)
According to Matt the RMB->Copy to selected wouldn't work for logics because the copy we need is for the whole logic (s/c/a). So (at least for the time been), copy logic is possible again.
It work as 2.49 (replacing the existent logic).
Add Logics is a python menu to give quick access to add logics. I have to see how to put that in Add Menu. I should be easy, but I'll leave it for later.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_logic.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/release/scripts/ui/space_logic.py b/release/scripts/ui/space_logic.py index 07b26fdc862..0dcdbbb1def 100644 --- a/release/scripts/ui/space_logic.py +++ b/release/scripts/ui/space_logic.py @@ -46,9 +46,18 @@ class LOGIC_PT_properties(bpy.types.Panel): row.prop(prop, "debug", text="", toggle=True, icon='INFO') row.operator("object.game_property_remove", text="", icon='X').index = i +class LOGIC_MT_logicbricks_add(bpy.types.Menu): + bl_label = "Add" + + def draw(self, context): + layout = self.layout + + layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor") + layout.operator_menu_enum("logic.controller_add", "type", text="Controller") + layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator") classes = [ - LOGIC_PT_properties] + LOGIC_PT_properties, LOGIC_MT_logicbricks_add] def register(): |