Merge branch 'blender-v4.1-release'
This commit is contained in:
@@ -99,6 +99,10 @@ class BoneCollectionDropTarget : public TreeViewItemDropTarget {
|
||||
|
||||
bool can_drop(const wmDrag &drag, const char **r_disabled_hint) const override
|
||||
{
|
||||
if (drag.type != WM_DRAG_BONE_COLLECTION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const ArmatureBoneCollection *drag_arm_bcoll = static_cast<const ArmatureBoneCollection *>(
|
||||
drag.poin);
|
||||
|
||||
|
||||
@@ -2869,7 +2869,8 @@ static void ed_panel_draw(const bContext *C,
|
||||
int w,
|
||||
int em,
|
||||
char *unique_panel_str,
|
||||
const char *search_filter)
|
||||
const char *search_filter,
|
||||
wmOperatorCallContext op_context)
|
||||
{
|
||||
const uiStyle *style = UI_style_get_dpi();
|
||||
|
||||
@@ -2907,6 +2908,8 @@ static void ed_panel_draw(const bContext *C,
|
||||
0,
|
||||
style);
|
||||
|
||||
uiLayoutSetOperatorContext(panel->layout, op_context);
|
||||
|
||||
pt->draw_header_preset(C, panel);
|
||||
|
||||
UI_block_apply_search_filter(block, search_filter);
|
||||
@@ -2938,6 +2941,8 @@ static void ed_panel_draw(const bContext *C,
|
||||
block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, labelx, labely, UI_UNIT_Y, 1, 0, style);
|
||||
}
|
||||
|
||||
uiLayoutSetOperatorContext(panel->layout, op_context);
|
||||
|
||||
pt->draw_header(C, panel);
|
||||
|
||||
UI_block_apply_search_filter(block, search_filter);
|
||||
@@ -2975,6 +2980,8 @@ static void ed_panel_draw(const bContext *C,
|
||||
0,
|
||||
style);
|
||||
|
||||
uiLayoutSetOperatorContext(panel->layout, op_context);
|
||||
|
||||
pt->draw(C, panel);
|
||||
|
||||
const bool ends_with_layout_panel_header = uiLayoutEndsWithPanelHeader(*panel->layout);
|
||||
@@ -3010,7 +3017,8 @@ static void ed_panel_draw(const bContext *C,
|
||||
w,
|
||||
em,
|
||||
unique_panel_str,
|
||||
search_filter);
|
||||
search_filter,
|
||||
op_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3182,11 +3190,8 @@ void ED_region_panels_layout_ex(const bContext *C,
|
||||
update_tot_size = false;
|
||||
}
|
||||
|
||||
if (panel && panel->layout) {
|
||||
uiLayoutSetOperatorContext(panel->layout, op_context);
|
||||
}
|
||||
|
||||
ed_panel_draw(C, region, ®ion->panels, pt, panel, width, em, nullptr, search_filter);
|
||||
ed_panel_draw(
|
||||
C, region, ®ion->panels, pt, panel, width, em, nullptr, search_filter, op_context);
|
||||
}
|
||||
|
||||
/* Draw "poly-instantiated" panels that don't have a 1 to 1 correspondence with their types. */
|
||||
@@ -3221,7 +3226,8 @@ void ED_region_panels_layout_ex(const bContext *C,
|
||||
width,
|
||||
em,
|
||||
unique_panel_str,
|
||||
search_filter);
|
||||
search_filter,
|
||||
op_context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -673,14 +673,18 @@ static void sequencer_tools_region_init(wmWindowManager *wm, ARegion *region)
|
||||
|
||||
static void sequencer_tools_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
wmOperatorCallContext op_context = WM_OP_INVOKE_REGION_WIN;
|
||||
switch (region->regiontype) {
|
||||
case RGN_TYPE_CHANNELS:
|
||||
op_context = WM_OP_INVOKE_REGION_CHANNELS;
|
||||
break;
|
||||
case RGN_TYPE_PREVIEW:
|
||||
|
||||
LISTBASE_FOREACH (ARegion *, ar, &area->regionbase) {
|
||||
if (ar->regiontype == RGN_TYPE_PREVIEW && region->regiontype == RGN_TYPE_TOOLS) {
|
||||
op_context = WM_OP_INVOKE_REGION_PREVIEW;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (region->regiontype == RGN_TYPE_CHANNELS) {
|
||||
op_context = WM_OP_INVOKE_REGION_CHANNELS;
|
||||
}
|
||||
|
||||
ED_region_panels_ex(C, region, op_context, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user