fix for a crash when running blender in debug mode (-d arg), was registering every operator in debug mode.
added some more sculpt key shortcuts * R toggles rake * Shift+A toggles airbrush note: last commit added Ctrl+0 to set zero subsurf and multires
This commit is contained in:
@@ -214,6 +214,12 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
|
||||
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_smooth_stroke");
|
||||
|
||||
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", RKEY, KM_PRESS, 0, 0);
|
||||
RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_rake");
|
||||
|
||||
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", AKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.use_airbrush");
|
||||
|
||||
/* brush switching */
|
||||
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", DKEY, KM_PRESS, 0, 0);
|
||||
RNA_string_set(kmi->ptr, "path", "tool_settings.sculpt.brush.sculpt_tool");
|
||||
|
||||
@@ -316,7 +316,13 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat)
|
||||
ED_undo_push_op(C, op);
|
||||
|
||||
if(repeat==0) {
|
||||
if((op->type->flag & OPTYPE_REGISTER) || (G.f & G_DEBUG))
|
||||
if(G.f & G_DEBUG) {
|
||||
char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
|
||||
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
|
||||
MEM_freeN(buf);
|
||||
}
|
||||
|
||||
if((op->type->flag & OPTYPE_REGISTER))
|
||||
wm_operator_register(C, op);
|
||||
else
|
||||
WM_operator_free(op);
|
||||
@@ -450,7 +456,13 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
|
||||
if(ot->flag & OPTYPE_UNDO)
|
||||
ED_undo_push_op(C, op);
|
||||
|
||||
if((ot->flag & OPTYPE_REGISTER) || (G.f & G_DEBUG))
|
||||
if(G.f & G_DEBUG) {
|
||||
char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
|
||||
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
|
||||
MEM_freeN(buf);
|
||||
}
|
||||
|
||||
if((ot->flag & OPTYPE_REGISTER))
|
||||
wm_operator_register(C, op);
|
||||
else
|
||||
WM_operator_free(op);
|
||||
@@ -899,7 +911,13 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
|
||||
if(ot->flag & OPTYPE_UNDO)
|
||||
ED_undo_push_op(C, op);
|
||||
|
||||
if((ot->flag & OPTYPE_REGISTER) || (G.f & G_DEBUG))
|
||||
if(G.f & G_DEBUG) {
|
||||
char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
|
||||
BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
|
||||
MEM_freeN(buf);
|
||||
}
|
||||
|
||||
if((ot->flag & OPTYPE_REGISTER))
|
||||
wm_operator_register(C, op);
|
||||
else
|
||||
WM_operator_free(op);
|
||||
|
||||
Reference in New Issue
Block a user