diff options
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 22 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 11 |
3 files changed, 18 insertions, 17 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index f007b5ad5a7..b591b99b31b 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -855,7 +855,7 @@ void uiTemplateTextureShow(uiLayout *layout, struct bContext *C, struct PointerR void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact); void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int cmpact); -void uiTemplateMovieclipInformation(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname,struct PointerRNA *userptr); +void uiTemplateMovieclipInformation(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr); void uiTemplateColorspaceSettings(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname); void uiTemplateColormanagedViewSettings(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname); diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index f6b706ba067..10e0e4c810a 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -91,10 +91,10 @@ static int same_tex_snap(TexSnapshot *snap, MTex *mtex, ViewContext *vc, bool co //(BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) && (mtex->brush_map_mode != MTEX_MAP_MODE_TILED || - (vc->ar->winx == snap->winx && - vc->ar->winy == snap->winy)) && + (vc->ar->winx == snap->winx && + vc->ar->winy == snap->winy)) && snap->old_zoom == zoom && - snap->old_col == col + snap->old_col == col ); } @@ -380,11 +380,11 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) len = sqrtf(x * x + y * y); if (len <= 1) { - float avg = BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ + float avg = BKE_brush_curve_strength(br, len, 1.0f); /* Falloff curve */ - /* clamp to avoid precision overflow */ - CLAMP(avg, 0.0f, 1.0f); - buffer[index] = 255 - (GLubyte)(255 * avg); + /* clamp to avoid precision overflow */ + CLAMP(avg, 0.0f, 1.0f); + buffer[index] = 255 - (GLubyte)(255 * avg); } else { @@ -643,13 +643,12 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush, /* Draw an overlay that shows what effect the brush's texture will * have on brush strength */ static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush, - ViewContext *vc, int x, int y, float zoom) + ViewContext *vc, int x, int y, float zoom) { rctf quad; /* check for overlay mode */ - if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR)) - { + if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR)) { return; } @@ -729,7 +728,8 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, false); if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR)) paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom); - } else { + } + else { if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY)) paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, true); if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR)) diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index f0265fd4e69..ae578ffefd1 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -497,7 +497,8 @@ static void stencil_set_target(StencilControlData *scd) scd->dim_target = br->mask_stencil_dimension; scd->rot_target = &br->mask_mtex.rot; scd->pos_target = br->mask_stencil_pos; - } else { + } + else { copy_v2_v2(scd->init_sdim, br->stencil_dimension); copy_v2_v2(scd->init_spos, br->stencil_pos); scd->init_rot = br->mtex.rot; @@ -598,8 +599,8 @@ static void stencil_control_calculate(StencilControlData *scd, const int mval[2] mdiff[0] = factor * scd->init_sdim[0]; if (scd->constrain_mode != STENCIL_CONSTRAINT_X) mdiff[1] = factor * scd->init_sdim[1]; - CLAMP(mdiff[0], 5.0, 10000); - CLAMP(mdiff[1], 5.0, 10000); + CLAMP(mdiff[0], 5.0f, 10000.0f); + CLAMP(mdiff[1], 5.0f, 10000.0f); copy_v2_v2(scd->dim_target, mdiff); break; } @@ -676,8 +677,8 @@ static int stencil_control_poll(bContext *C) Brush *br = BKE_paint_brush(paint); return (br && - (br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL || - br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL)); + (br->mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL || + br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL)); } static void BRUSH_OT_stencil_control(wmOperatorType *ot) |