Page MenuHome

Weight paint gradient shows emty undo popup
Open, Confirmed, MediumPublic

Description

System Information
Operating system: Linux

Blender Version
Broken: rB2e6139dfc2e34e6562e36a637683cba37a53309f

Short description of error
Weight paint gradient op shows empty redo box.
To get the useful one, you have to press F9.

Details

Type
Bug

Event Timeline

Germano Cavalcante (mano-wii) triaged this task as Confirmed, Medium priority.

The panel has a pool that prevents it from being drawn in regions other than RGN_TYPE_WINDOW.
A simple solution is to add the RGN_TYPE_HUD.

diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 980b043bf8b..e8116d45340 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -260,7 +260,7 @@ static bool weight_paint_poll_ex(bContext *C, bool check_tool)
       (BKE_paint_brush(&CTX_data_tool_settings(C)->wpaint->paint) != NULL) &&
       (sa = CTX_wm_area(C)) && (sa->spacetype == SPACE_VIEW3D)) {
     ARegion *ar = CTX_wm_region(C);
-    if (ar->regiontype == RGN_TYPE_WINDOW) {
+    if (ELEM(ar->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_HUD)) {
       if (!check_tool || WM_toolsystem_active_tool_is_brush(C)) {
         return 1;
       }