[Bf-blender-cvs] [fce2c12ca69] modifier-panels-ui: Merge branch 'master' into modifier-panels-ui

Hans Goudey noreply at git.blender.org
Sat Apr 4 00:01:02 CEST 2020


Commit: fce2c12ca696fffa1cd52e9cc70c8e7101ff230a
Author: Hans Goudey
Date:   Fri Apr 3 17:00:53 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rBfce2c12ca696fffa1cd52e9cc70c8e7101ff230a

Merge branch 'master' into modifier-panels-ui

===================================================================



===================================================================

diff --cc source/blender/editors/interface/interface_panel.c
index 2f4e4aad312,42179452279..abaac1be1d6
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@@ -235,32 -234,7 +235,32 @@@ static bool panels_need_realign(ScrAre
  
  /****************************** panels ******************************/
  
 -static void panels_collapse_all(ScrArea *area, ARegion *region, const Panel *from_pa)
 +/**
 + * Call the callback to store the panel and subpanel expansion settings in the list item that
 + * corresponds to this panel.
 + *
 + * NOTE: This needs to iterate through all of the regions panels because that panel with changed
 + * expansion could have been the subpanel of a recreate panel and might not know about its
 + * corresponding list item.
 + */
 +static void set_list_panel_item_expansion_flag(const bContext *C, ARegion *region)
 +{
 +  LISTBASE_FOREACH (Panel *, panel, &region->panels) {
 +    PanelType *panel_type = panel->type;
 +    if (panel_type == NULL) {
 +      continue;
 +    }
 +
 +    if (panel->type->flag & PANELTYPE_RECREATE) {
 +      panel->type->set_expand_flag_from_panel(C, panel);
 +    }
 +  }
 +}
 +
 +static void panels_collapse_all(const bContext *C,
-                                 ScrArea *sa,
++                                ScrArea *area,
 +                                ARegion *region,
 +                                const Panel *from_pa)
  {
    const bool has_category_tabs = UI_panel_category_is_visible(region);
    const char *category = has_category_tabs ? UI_panel_category_active_get(region, false) : NULL;
@@@ -1785,7 -1620,7 +1785,7 @@@ static void ui_handle_panel_header
      }
      else { /* collapse */
        if (ctrl) {
-         panels_collapse_all(C, sa, region, block->panel);
 -        panels_collapse_all(area, region, block->panel);
++        panels_collapse_all(C, area, region, block->panel);
  
          /* reset the view - we don't want to display a view without content */
          UI_view2d_offset(&region->v2d, 0.0f, 1.0f);
@@@ -2625,12 -2458,11 +2625,12 @@@ static int ui_handler_panel(bContext *C
  
    /* verify if we can stop */
    if (event->type == LEFTMOUSE && event->val == KM_RELEASE) {
-     ScrArea *sa = CTX_wm_area(C);
+     ScrArea *area = CTX_wm_area(C);
      ARegion *region = CTX_wm_region(C);
-     int align = panel_aligned(sa, region);
+     int align = panel_aligned(area, region);
  
      if (align) {
 +      data->is_drag_drop = true;
        panel_activate_state(C, panel, PANEL_STATE_ANIMATION);
      }
      else {
diff --cc source/blender/editors/interface/interface_templates.c
index cb0f6b97415,ba7cd708bfa..0d5b7d7c50a
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@@ -6886,11 -7107,11 +6886,12 @@@ static struct MenuSearch_Data *menu_ite
      UI_block_free(NULL, block);
  
      /* Add key-map items as a second pass,
 -     * so all menus are accessed from the header & top-bar before key shortcuts are expanded. */
 +     * so all menus are accessed from the header & top-bar before key shortcuts are expanded.
 +     */
      if ((menu_stack == NULL) && (has_keymap_menu_items == false)) {
        has_keymap_menu_items = true;
-       menu_types_add_from_keymap_items(C, win, sa, region, &menu_stack, menu_to_kmi, menu_tagged);
+       menu_types_add_from_keymap_items(
+           C, win, area, region, &menu_stack, menu_to_kmi, menu_tagged);
      }
    }
  
diff --cc source/blender/editors/screen/area.c
index 237a619b454,49838b62b71..b12560dec28
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@@ -561,9 -560,9 +561,9 @@@ void ED_region_do_draw(bContext *C, ARe
  
    memset(&region->drawrct, 0, sizeof(region->drawrct));
  
 -  UI_blocklist_free_inactive(C, &region->uiblocks);
 +  UI_blocklist_free_inactive(C, region);
  
-   if (sa) {
+   if (area) {
      const bScreen *screen = WM_window_get_active_screen(win);
  
      /* Only region emboss for top-bar */
@@@ -2590,19 -2583,10 +2590,20 @@@ void ED_region_panels_layout_ex(const b
          continue;
        }
      }
-     ed_panel_draw(C, sa, region, &region->panels, pt, panel, w, em, vertical);
+ 
+     ed_panel_draw(C, area, region, &region->panels, pt, panel, w, em, vertical);
    }
  
 +  if (has_recreate_panel) {
 +    for (Panel *panel = region->panels.first; panel; panel = panel->next) {
 +      if (panel->type != NULL) { /* Some panels don't have a type.. */
 +        if (panel->type->flag & PANELTYPE_RECREATE) {
-           ed_panel_draw(C, sa, region, &region->panels, panel->type, panel, w, em, vertical);
++          ed_panel_draw(C, area, region, &region->panels, panel->type, panel, w, em, vertical);
 +        }
 +      }
 +    }
 +  }
 +
    /* align panels and return size */
    UI_panels_end(C, region, &x, &y);
  
diff --cc source/blender/modifiers/intern/MOD_dynamicpaint.c
index ee5c18747cb,d36fce3752b..96c589c2b8e
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@@ -20,10 -20,9 +20,11 @@@
  
  #include <stddef.h>
  
+ #include "BLI_listbase.h"
  #include "BLI_utildefines.h"
  
 +#include "BLT_translation.h"
 +
  #include "DNA_dynamicpaint_types.h"
  #include "DNA_mesh_types.h"
  #include "DNA_object_force_types.h"



More information about the Bf-blender-cvs mailing list