Page MenuHome

Python GizmoGroups not working in VSE
Closed, ResolvedPublicKNOWN ISSUE

Description

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


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.

Event Timeline

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()

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'

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.

Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.EditedOct 14 2019, 2:45 PM

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

@Campbell Barton (campbellbarton) : 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?

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

Richard Antalik (ISS) changed the subtype of this task from "Report" to "Known Issue".

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