style cleanup

This commit is contained in:
Campbell Barton 2013-04-23 05:29:06 +00:00
parent 42063f36af
commit 511451c8b8
3 changed files with 18 additions and 17 deletions

@ -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);

@ -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))

@ -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)