Page MenuHome

Movie Clip Editor in Graph mode - clip.graph_select_border does not work by header menu
Closed, ResolvedPublic


System Information
Operating system and graphics card

Windows 7 64 Bit, Nvidia 760 GTX

Blender Version
Broken: (example: 2.69.7 4b206af, see splash screen)
Worked: (optional)

Blender 2.79 a rc 1

Short description of error

The currently hotkey only tool Border select in the Movie Clip editor in Graph Editing mode does not work from a menu in the header.

Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

Replace the by the attached , run Blender, load the dataset attached. Have a look at the Graph window. There is a new menu called Select. Try border select from this menu. You will get errors in the console. See screenshot.

The background is, i tried to implement a select menu in the Movie Clip Editor in Graph Editor mode since i have the feeling that also this sub editor should show the select tools. The Border Select tool works fine in this subeditor by using the hotkey B. But it throws an error when i try to call the border select from the by me implemented select menu.

wmSubWindowScissorSet 0: doesn't exist.

What already baffles me is that the menu operator does not even show the hotkey as it should. And this counts for all the hotkey tools in the graph editor section in the Input manager . They just seem to work from the hotkeys, not from a menu in the clip editor in graph editing mode.

I also tried to implement the Border select into the already existing View menu. See small screenshot. Here the tool does not thrown an error. But the border select just works in the header. And here we don't have the graphs. The graphs are in the main window below the header.

The reason that i think this is a bug is that Border select works in all other editor types from menu just fine.

Changes at the

185 add

if sc.view == 'GRAPH':
    if clip:"CLIP_GRAPH_MT_select")

1403 add

class CLIP_GRAPH_MT_select(Menu):

bl_label = "Select"

def draw(self, context):
    layout = self.layout

    layout.operator("clip.graph_select_border", icon = 'BORDER_RECT')

1553 add


Related Objects

Event Timeline

Graph view in clip editor is handled by region type of PREVIEW, so you need to invoke operators from that context.

In order to do so, you need to add layout.operator_context = 'INVOKE_REGION_PREVIEW' before adding operators in the menu.

However, there is still issue in the event system which will not allow this operator to run. For some reason, non-main window regions will not have event set in wm_operator_call_internal(). Reasoning of this is uncleear to me. Doing something like

1diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
2index d36702b4df7..4068684beb2 100644
3--- a/source/blender/windowmanager/intern/wm_event_system.c
4+++ b/source/blender/windowmanager/intern/wm_event_system.c
5@@ -1279,6 +1279,7 @@ static int wm_operator_call_internal(
6 switch (context) {
12 /* window is needed for invoke, cancel operator */

fixes the issue to me.

Sergey Sharybin (sergey) triaged this task as Confirmed, Medium priority.

@Brecht Van Lommel (brecht), maybe you'll want to have a look as well :)

Also add WM_OP_INVOKE_REGION_CHANNELS I think. Otherwise looks good to me, I don't think leaving out the preview and channels was intentional.

Thanks for the quick fix and the advice. Now it works :)