diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-23 18:06:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-23 18:06:47 +0300 |
commit | 6c1bbcd8a2a617b04d053f7f4444b2613a720aa0 (patch) | |
tree | 4909049c7ec404952377c5b7462cbe3cb4f2e508 | |
parent | bb094b8655bac5dcee1b9728891d1e49bb18557e (diff) |
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
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 24 |
2 files changed, 27 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index b87d229545e..5cfda009514 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -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"); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 6b0368fbf8a..825d8cbcf8c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -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); |