Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-02-08 02:39:44 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-08 02:39:44 +0300
commit2f72b91a54faa7cfbdfd97eff608c8911df1d221 (patch)
tree82db3f8d8b5c80a2e7fc2c268048967480b2f3f9 /release
parentf99d06bc83449162a62378e5f832e52fbc765426 (diff)
Operator Execution Contexts Bugfix:
This commit adds a few more execution contexts for operators, given the increasing tendency for some special regiontypes to exist within areas that must have their own set of special operators. Examples of these include the "channel" operators in the Animation Editors (i.e. those in the 'Channels' menu), and the "Fit to Preview Window" operator for the Sequencer. Previously, operators such as these would not function when clicked on from the menus, and they would not show the hotkeys they were mapped to. Also, fixed a few operator definitions in the Animation Editors which were missing ot->prop defines. This meant that some hotkeys (mainly selection) were shown incorrectly in the menus.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/space_dopesheet.py2
-rw-r--r--release/scripts/ui/space_graph.py2
-rw-r--r--release/scripts/ui/space_sequencer.py2
3 files changed, 6 insertions, 0 deletions
diff --git a/release/scripts/ui/space_dopesheet.py b/release/scripts/ui/space_dopesheet.py
index 2bd0300c465..f0ddc3b4651 100644
--- a/release/scripts/ui/space_dopesheet.py
+++ b/release/scripts/ui/space_dopesheet.py
@@ -130,6 +130,8 @@ class DOPESHEET_MT_channel(bpy.types.Menu):
def draw(self, context):
layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_CHANNELS'
+
layout.column()
layout.operator("anim.channels_setting_toggle")
layout.operator("anim.channels_setting_enable")
diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py
index 511ab06d0da..3ee85672f28 100644
--- a/release/scripts/ui/space_graph.py
+++ b/release/scripts/ui/space_graph.py
@@ -133,6 +133,8 @@ class GRAPH_MT_channel(bpy.types.Menu):
def draw(self, context):
layout = self.layout
+ layout.operator_context = 'INVOKE_REGION_CHANNELS'
+
layout.column()
layout.operator("anim.channels_setting_toggle")
layout.operator("anim.channels_setting_enable")
diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py
index 9a63903300e..d1b7affc1be 100644
--- a/release/scripts/ui/space_sequencer.py
+++ b/release/scripts/ui/space_sequencer.py
@@ -123,7 +123,9 @@ class SEQUENCER_MT_view(bpy.types.Menu):
if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
layout.operator("sequencer.view_all", text='View all Sequences')
if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
+ layout.operator_context = 'INVOKE_REGION_PREVIEW'
layout.operator("sequencer.view_all_preview", text='Fit preview in window')
+ layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("sequencer.view_selected")
layout.prop(st, "draw_frames")