style cleanup
This commit is contained in:
@@ -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 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 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 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 uiTemplateColorspaceSettings(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname);
|
||||||
void uiTemplateColormanagedViewSettings(struct uiLayout *layout, struct bContext *C, 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)) &&
|
//(BKE_brush_size_get(vc->scene, brush) <= snap->BKE_brush_size_get)) &&
|
||||||
|
|
||||||
(mtex->brush_map_mode != MTEX_MAP_MODE_TILED ||
|
(mtex->brush_map_mode != MTEX_MAP_MODE_TILED ||
|
||||||
(vc->ar->winx == snap->winx &&
|
(vc->ar->winx == snap->winx &&
|
||||||
vc->ar->winy == snap->winy)) &&
|
vc->ar->winy == snap->winy)) &&
|
||||||
snap->old_zoom == zoom &&
|
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);
|
len = sqrtf(x * x + y * y);
|
||||||
|
|
||||||
if (len <= 1) {
|
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 to avoid precision overflow */
|
||||||
CLAMP(avg, 0.0f, 1.0f);
|
CLAMP(avg, 0.0f, 1.0f);
|
||||||
buffer[index] = 255 - (GLubyte)(255 * avg);
|
buffer[index] = 255 - (GLubyte)(255 * avg);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
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
|
/* Draw an overlay that shows what effect the brush's texture will
|
||||||
* have on brush strength */
|
* have on brush strength */
|
||||||
static void paint_draw_cursor_overlay(UnifiedPaintSettings *ups, Brush *brush,
|
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;
|
rctf quad;
|
||||||
/* check for overlay mode */
|
/* check for overlay mode */
|
||||||
|
|
||||||
if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR))
|
if (!(brush->overlay_flags & BRUSH_OVERLAY_CURSOR)) {
|
||||||
{
|
|
||||||
return;
|
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);
|
paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, false);
|
||||||
if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR))
|
if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR))
|
||||||
paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom);
|
paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY))
|
if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY))
|
||||||
paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, true);
|
paint_draw_tex_overlay(ups, brush, vc, x, y, zoom, false, true);
|
||||||
if (!(flags & PAINT_OVERLAY_OVERRIDE_CURSOR))
|
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->dim_target = br->mask_stencil_dimension;
|
||||||
scd->rot_target = &br->mask_mtex.rot;
|
scd->rot_target = &br->mask_mtex.rot;
|
||||||
scd->pos_target = br->mask_stencil_pos;
|
scd->pos_target = br->mask_stencil_pos;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
copy_v2_v2(scd->init_sdim, br->stencil_dimension);
|
copy_v2_v2(scd->init_sdim, br->stencil_dimension);
|
||||||
copy_v2_v2(scd->init_spos, br->stencil_pos);
|
copy_v2_v2(scd->init_spos, br->stencil_pos);
|
||||||
scd->init_rot = br->mtex.rot;
|
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];
|
mdiff[0] = factor * scd->init_sdim[0];
|
||||||
if (scd->constrain_mode != STENCIL_CONSTRAINT_X)
|
if (scd->constrain_mode != STENCIL_CONSTRAINT_X)
|
||||||
mdiff[1] = factor * scd->init_sdim[1];
|
mdiff[1] = factor * scd->init_sdim[1];
|
||||||
CLAMP(mdiff[0], 5.0, 10000);
|
CLAMP(mdiff[0], 5.0f, 10000.0f);
|
||||||
CLAMP(mdiff[1], 5.0, 10000);
|
CLAMP(mdiff[1], 5.0f, 10000.0f);
|
||||||
copy_v2_v2(scd->dim_target, mdiff);
|
copy_v2_v2(scd->dim_target, mdiff);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -676,8 +677,8 @@ static int stencil_control_poll(bContext *C)
|
|||||||
Brush *br = BKE_paint_brush(paint);
|
Brush *br = BKE_paint_brush(paint);
|
||||||
|
|
||||||
return (br &&
|
return (br &&
|
||||||
(br->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));
|
br->mask_mtex.brush_map_mode == MTEX_MAP_MODE_STENCIL));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void BRUSH_OT_stencil_control(wmOperatorType *ot)
|
static void BRUSH_OT_stencil_control(wmOperatorType *ot)
|
||||||
|
Reference in New Issue
Block a user