Python GizmoGroups not working in VSE #70768

Closed
opened 2019-10-12 22:03:16 +02:00 by Lukas W · 12 comments

System Information
Operating system: Ubuntu 18.04
Graphics card: GeForce MX150

Blender Version
Broken: 2.81 alpha

Short description of error
GizmoGroups registered to a 'SEQUENCE_EDITOR' space are never polled and thus never executed

Exact steps for others to reproduce the error
gizmosmissing.blend
Open attached blendfile in a blender instance with visible console output and execute the script open in the text editor. Switch to the Video Editing workspace. No output in the console is generated. Switch back to the scripting workspace and swap in the commented out line "bl_space_type = 'IMAGE_EDITOR'". Execute again and this time switch to the UV Editing workspace. Note how this time the output "poll" is generated in the console repeatedly.
Expected result: The output "poll" is generated in both cases.

**System Information** Operating system: Ubuntu 18.04 Graphics card: GeForce MX150 **Blender Version** Broken: 2.81 alpha **Short description of error** GizmoGroups registered to a 'SEQUENCE_EDITOR' space are never polled and thus never executed **Exact steps for others to reproduce the error** [gizmosmissing.blend](https://archive.blender.org/developer/F7810916/gizmosmissing.blend) Open attached blendfile in a blender instance with visible console output and execute the script open in the text editor. Switch to the Video Editing workspace. No output in the console is generated. Switch back to the scripting workspace and swap in the commented out line "bl_space_type = 'IMAGE_EDITOR'". Execute again and this time switch to the UV Editing workspace. Note how this time the output "poll" is generated in the console repeatedly. Expected result: The output "poll" is generated in both cases.
Author

Added subscriber: @geloescht

Added subscriber: @geloescht
Author

I am not familiar with Blender's C code and really don't know if I am on the right track here, but there is one function that seems to be called in all spaces that I can get gizmos working and not in spaces that gizmos don't work for me (tested in text editor and VSE): WM_gizmomap_tag_refresh()

I am not familiar with Blender's C code and really don't know if I am on the right track here, but there is one function that seems to be called in all spaces that I can get gizmos working and not in spaces that gizmos don't work for me (tested in text editor and VSE): WM_gizmomap_tag_refresh()
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

This actually works for the preview area if you set

  • bl_space_type = 'SEQUENCE_EDITOR'
  • bl_region_type = 'PREVIEW'

but for some reason is missing in the "regular" bl_region_type = 'WINDOW'

This actually works for the preview area if you set - bl_space_type = 'SEQUENCE_EDITOR' - bl_region_type = 'PREVIEW' but for some reason is missing in the "regular" bl_region_type = 'WINDOW'
Author

Thank you so much! Using gizmos in the preview region is probably a more common use, but I didn't know about it. So I think you can also treat this as a matter of incomplete documentation.

Thank you so much! Using gizmos in the preview region is probably a more common use, but I didn't know about it. So I think you can also treat this as a matter of incomplete documentation.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Well, I guess this should work for the other region_types as well...

@ideasman42 : checked a bit, seems like sequencer_main_region_draw doesnt call WM_gizmomap_draw [as opposed to sequencer_preview_region_draw].
But when I add that, ar->gizmo_map will be NULL there.
Checked a bit further and there seems nothing wrong with how the GizmoGroup is actually registered [rna_GizmoGroup_register] for the region_type = 'WINDOW' case...

Does this ring a bell?

Well, I guess this should work for the other region_types as well... @ideasman42 : checked a bit, seems like `sequencer_main_region_draw` doesnt call `WM_gizmomap_draw` [as opposed to sequencer_preview_region_draw]. But when I add that, `ar->gizmo_map` will be NULL there. Checked a bit further and there seems nothing wrong with how the `GizmoGroup` is actually registered [`rna_GizmoGroup_register`] for the region_type = 'WINDOW' case... Does this ring a bell?
Author

I know this is not the right place to ask questions, but now that I have the attention of knowledgeable people on the rather obscure and new matter of custom gizmos: How do I make a 2D gizmo pan and scale with the area? It seems like in the node editor as well as the sequencer preview the gizmo is always drawn relative to the area frame and not to the content of the area.
I made a stackexchange question as well, but I have a feeling it will go unanswered: https://blender.stackexchange.com/questions/155528/python-how-to-pan-and-scale-gizmogroup-with-background

I know this is not the right place to ask questions, but now that I have the attention of knowledgeable people on the rather obscure and new matter of custom gizmos: How do I make a 2D gizmo pan and scale with the area? It seems like in the node editor as well as the sequencer preview the gizmo is always drawn relative to the area frame and not to the content of the area. I made a stackexchange question as well, but I have a feeling it will go unanswered: https://blender.stackexchange.com/questions/155528/python-how-to-pan-and-scale-gizmogroup-with-background

Added subscriber: @iss

Added subscriber: @iss

I havent really looked into this so will treat as known issue.
It may be very well bug, but I think this may easily turn out to accidental feature request

I havent really looked into this so will treat as known issue. It may be very well bug, but I think this may easily turn out to accidental feature request

This issue was referenced by 445361c2ac

This issue was referenced by 445361c2ace8fe51c874ec234e8786578c8e4635

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2021-11-05 06:04:23 +01:00
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
5 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#70768
No description provided.