style cleanup: gpencil & metaball

This commit is contained in:
Campbell Barton 2012-05-08 18:29:02 +00:00
parent f605679515
commit 81255ca8ce
15 changed files with 1111 additions and 1107 deletions

@ -54,15 +54,19 @@ void ED_keymap_gpencil(wmKeyConfig *keyconf)
wmKeyMapItem *kmi; wmKeyMapItem *kmi;
/* Draw */ /* Draw */
/* draw */ /* draw */
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY); kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW);
/* draw - straight lines */ /* draw - straight lines */
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY); kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY);
RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT);
/* draw - poly lines */ /* draw - poly lines */
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, KM_CTRL, DKEY); kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, KM_CTRL, DKEY);
RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_POLY); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_POLY);
/* erase */ /* erase */
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY); kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY);
RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER); RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER);

@ -648,8 +648,8 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
copy_v2_v2_int(mval, &ptc->x); copy_v2_v2_int(mval, &ptc->x);
if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) && if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
(i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr+i) == 0)) (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
) { {
interp_depth = TRUE; interp_depth = TRUE;
} }
else { else {

@ -268,7 +268,7 @@ struct uiBlock {
float minx, miny, maxx, maxy; float minx, miny, maxx, maxy;
float aspect; float aspect;
int puphash; // popup menu hash for memory int puphash; /* popup menu hash for memory */
uiButHandleFunc func; uiButHandleFunc func;
void *func_arg1; void *func_arg1;