Movie Clip Editor in Graph mode - clip.graph_select_border does not work by header menu #54076

Closed
opened 2018-02-15 08:49:05 +01:00 by Reiner Prokein · 9 comments

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 space_clip.py by the attached space_clip.py , 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 space_clip.py:

185 add

  if sc.view == 'GRAPH':
      if clip:
          layout.menu("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

CLIP_GRAPH_MT_select,

dataset_for_test.zip

space_clip.zip

clipgraphselectborder.jpg

clipgraphselectborder2.jpg

**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 space_clip.py by the attached space_clip.py , 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 space_clip.py: 185 add ``` if sc.view == 'GRAPH': if clip: layout.menu("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 CLIP_GRAPH_MT_select, [dataset_for_test.zip](https://archive.blender.org/developer/F2283631/dataset_for_test.zip) [space_clip.zip](https://archive.blender.org/developer/F2283642/space_clip.zip) ![clipgraphselectborder.jpg](https://archive.blender.org/developer/F2283647/clipgraphselectborder.jpg) ![clipgraphselectborder2.jpg](https://archive.blender.org/developer/F2283648/clipgraphselectborder2.jpg)
Author

Added subscriber: @tiles

Added subscriber: @tiles

Added subscriber: @Sergey

Added subscriber: @Sergey

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

P612: (An Untitled Masterwork)

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index d36702b4df7..4068684beb2 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1279,6 +1279,7 @@ static int wm_operator_call_internal(
 		switch (context) {
 			case WM_OP_INVOKE_DEFAULT:
 			case WM_OP_INVOKE_REGION_WIN:
+			case WM_OP_INVOKE_REGION_PREVIEW:
 			case WM_OP_INVOKE_AREA:
 			case WM_OP_INVOKE_SCREEN:
 				/* window is needed for invoke, cancel operator */

fixes the issue to me.

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 [P612: (An Untitled Masterwork)](https://archive.blender.org/developer/P612.txt) ``` diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index d36702b4df7..4068684beb2 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1279,6 +1279,7 @@ static int wm_operator_call_internal( switch (context) { case WM_OP_INVOKE_DEFAULT: case WM_OP_INVOKE_REGION_WIN: + case WM_OP_INVOKE_REGION_PREVIEW: case WM_OP_INVOKE_AREA: case WM_OP_INVOKE_SCREEN: /* window is needed for invoke, cancel operator */ ``` fixes the issue to me.
Campbell Barton was assigned by Sergey Sharybin 2018-02-15 14:51:44 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

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

@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.

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.

This issue was referenced by b879502da4

This issue was referenced by b879502da43c17df85597339f53b9308bfbf674e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author

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

Thanks for the quick fix and the advice. Now it works :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#54076
No description provided.