main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
2 changed files with 29 additions and 27 deletions
Showing only changes of commit b228e5b118 - Show all commits

View File

@ -21,9 +21,9 @@
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_modifier.h"
#include "DEG_depsgraph.h"
@ -31,9 +31,8 @@
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.hh"
@ -739,24 +738,22 @@ wmKeyMap *filter_mesh_modal_keymap(wmKeyConfig *keyconf)
return keymap;
}
static void sculpt_mesh_update_status_bar(bContext* C, wmOperator* op) {
static void sculpt_mesh_update_status_bar(bContext *C, wmOperator *op)
{
char header[UI_MAX_DRAW_STR];
char buf[UI_MAX_DRAW_STR];
int available_len = sizeof(buf);
char *p = buf;
#define WM_MODALKEY(_id) \
WM_modalkeymap_operator_items_to_string_buf( \
op->type, (_id), true, UI_MAX_SHORTCUT_STR, &available_len, &p)
BLI_snprintf(
header,
BLI_snprintf(header,
sizeof(header),
TIP_("%s: Confirm, %s: Cancel"),
WM_MODALKEY(FILTER_MESH_MODAL_CONFIRM),
WM_MODALKEY(FILTER_MESH_MODAL_CANCEL)
);
WM_MODALKEY(FILTER_MESH_MODAL_CANCEL));
#undef WM_MODALKEY
@ -857,7 +854,10 @@ static void sculpt_mesh_filter_end(bContext *C)
SCULPT_flush_update_done(C, ob, SCULPT_UPDATE_COORDS);
}
static int sculpt_mesh_filter_confirm(SculptSession *ss, wmOperator* op, const eSculptMeshFilterType filter_type) {
static int sculpt_mesh_filter_confirm(SculptSession *ss,
wmOperator *op,
const eSculptMeshFilterType filter_type)
{
float initial_strength = ss->filter_cache->start_filter_strength;
/* Don't update strength property if we're storing an event history. */
@ -974,7 +974,9 @@ static int sculpt_mesh_filter_modal(bContext *C, wmOperator *op, const wmEvent *
return OPERATOR_RUNNING_MODAL;
}
static void sculpt_filter_specific_init(const eSculptMeshFilterType filter_type, wmOperator* op, SculptSession* ss)
static void sculpt_filter_specific_init(const eSculptMeshFilterType filter_type,
wmOperator *op,
SculptSession *ss)
{
switch (filter_type) {
case MESH_FILTER_SURFACE_SMOOTH: {
@ -1178,7 +1180,8 @@ void SCULPT_OT_mesh_filter(wmOperatorType *ot)
Check `sculpt_mesh_filter_modal` to see where it's really called. */
ot->cancel = sculpt_mesh_filter_cancel;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_GRAB_CURSOR_X | OPTYPE_BLOCKING | OPTYPE_DEPENDS_ON_CURSOR;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_GRAB_CURSOR_X | OPTYPE_BLOCKING |
OPTYPE_DEPENDS_ON_CURSOR;
/* RNA. */
SCULPT_mesh_filter_properties(ot);

View File

@ -1428,7 +1428,6 @@ void ED_operatortypes_sculpt(void)
WM_operatortype_append(SCULPT_OT_reveal_all);
}
void ED_keymap_sculpt(wmKeyConfig *keyconf)
{
filter_mesh_modal_keymap(keyconf);