[Bf-blender-cvs] [e35f9f0408a] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Mon Jul 2 18:55:35 CEST 2018
Commit: e35f9f0408a77422f0f7c1593dcabede69820527
Author: Campbell Barton
Date: Mon Jul 2 18:48:24 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe35f9f0408a77422f0f7c1593dcabede69820527
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/editors/sculpt_paint/paint_image.c
index 02fd685719e,ab04a927573..7f71270c52d
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@@ -882,12 -851,13 +888,13 @@@ static void sample_color_update_header(
ScrArea *sa = CTX_wm_area(C);
if (sa) {
- BLI_snprintf(msg, sizeof(msg),
- IFACE_("Sample color for %s"),
- !data->sample_palette ?
- IFACE_("Brush. Use Left Click to sample for palette instead") :
- IFACE_("Palette. Use Left Click to sample more colors"));
+ BLI_snprintf(
+ msg, sizeof(msg),
+ IFACE_("Sample color for %s"),
+ !data->sample_palette ?
+ IFACE_("Brush. Use Left Click to sample for palette instead") :
+ IFACE_("Palette. Use Left Click to sample more colors"));
- ED_area_headerprint(sa, msg);
+ ED_workspace_status_text(C, msg);
}
}
diff --cc source/blender/editors/sculpt_paint/paint_image_2d.c
index a75d6344849,76190b13b61..da08766b322
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@@ -862,8 -865,8 +866,9 @@@ static void paint_2d_lift_soften(ImageP
out_off[0] = out_off[1] = 0;
if (!tile) {
-- IMB_rectclip(ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0],
-- &out_off[1], &dim[0], &dim[1]);
++ IMB_rectclip(
++ ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0],
++ &out_off[1], &dim[0], &dim[1]);
if ((dim[0] == 0) || (dim[1] == 0))
return;
diff --cc source/blender/editors/sculpt_paint/paint_image_proj.c
index 8c5fdc617c6,6b13decd41b..04329697b54
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@@ -2603,9 -2599,21 +2603,10 @@@ static void project_paint_face_init
#endif
if (pixel_bounds_array(uv_clip, &bounds_px, ibuf->x, ibuf->y, uv_clip_tot)) {
-
- if (clamp_u) {
- CLAMP(bounds_px.xmin, 0, ibuf->x);
- CLAMP(bounds_px.xmax, 0, ibuf->x);
- }
-
- if (clamp_v) {
- CLAMP(bounds_px.ymin, 0, ibuf->y);
- CLAMP(bounds_px.ymax, 0, ibuf->y);
- }
-
#if 0
- project_paint_undo_tiles_init(&bounds_px, ps->projImages + image_index, tmpibuf,
- tile_width, threaded, ps->do_masking);
+ project_paint_undo_tiles_init(
+ &bounds_px, ps->projImages + image_index, tmpibuf,
+ tile_width, threaded, ps->do_masking);
#endif
/* clip face and */
diff --cc source/blender/editors/sculpt_paint/paint_intern.h
index a7041a5e9ea,b782a47192a..7d3049434d6
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@@ -65,10 -65,10 +65,11 @@@ typedef void (*StrokeUpdateStep)(struc
typedef void (*StrokeRedraw)(const struct bContext *C, struct PaintStroke *stroke, bool final);
typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke *stroke);
--struct PaintStroke *paint_stroke_new(struct bContext *C, struct wmOperator *op,
-- StrokeGetLocation get_location, StrokeTestStart test_start,
-- StrokeUpdateStep update_step, StrokeRedraw redraw,
-- StrokeDone done, int event_type);
++struct PaintStroke *paint_stroke_new(
++ struct bContext *C, struct wmOperator *op,
++ StrokeGetLocation get_location, StrokeTestStart test_start,
++ StrokeUpdateStep update_step, StrokeRedraw redraw,
++ StrokeDone done, int event_type);
void paint_stroke_data_free(struct wmOperator *op);
bool paint_space_stroke_enabled(struct Brush *br, enum ePaintMode mode);
@@@ -248,20 -247,21 +249,22 @@@ void SCULPT_OT_uv_sculpt_stroke(struct
/* Convert the object-space axis-aligned bounding box (expressed as
* its minimum and maximum corners) into a screen-space rectangle,
* returns zero if the result is empty */
--bool paint_convert_bb_to_rect(struct rcti *rect,
-- const float bb_min[3],
-- const float bb_max[3],
-- const struct ARegion *ar,
-- struct RegionView3D *rv3d,
-- struct Object *ob);
++bool paint_convert_bb_to_rect(
++ struct rcti *rect,
++ const float bb_min[3],
++ const float bb_max[3],
++ const struct ARegion *ar,
++ struct RegionView3D *rv3d,
++ struct Object *ob);
/* Get four planes in object-space that describe the projection of
* screen_rect from screen into object-space (essentially converting a
* 2D screens-space bounding box into four 3D planes) */
--void paint_calc_redraw_planes(float planes[4][4],
-- const struct ARegion *ar,
- struct RegionView3D *rv3d,
-- struct Object *ob,
-- const struct rcti *screen_rect);
++void paint_calc_redraw_planes(
++ float planes[4][4],
++ const struct ARegion *ar,
++ struct Object *ob,
++ const struct rcti *screen_rect);
float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius);
float paint_get_tex_pixel(const struct MTex *mtex, float u, float v, struct ImagePool *pool, int thread);
@@@ -307,8 -309,8 +312,9 @@@ typedef enum
RC_COLOR_OVERRIDE = 32,
} RCFlags;
--void set_brush_rc_props(struct PointerRNA *ptr, const char *paint, const char *prop, const char *secondary_prop,
-- RCFlags flags);
++void set_brush_rc_props(
++ struct PointerRNA *ptr, const char *paint, const char *prop, const char *secondary_prop,
++ RCFlags flags);
/* paint_hide.c */
diff --cc source/blender/editors/sculpt_paint/paint_ops.c
index f89236dbbc1,b42a825ad7c..9f14a821613
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@@ -1335,9 -1344,9 +1340,8 @@@ void ED_keymap_paint(wmKeyConfig *keyco
WM_keymap_add_item(keymap, "PAINT_OT_brush_colors_flip", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PAINT_OT_sample_color", SKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap,
- "PAINT_OT_vertex_color_set", KKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_vertex_color_set", KKEY, KM_PRESS, KM_SHIFT, 0);
- ed_keymap_paint_brush_switch(keymap, "vertex_paint");
ed_keymap_paint_brush_size(keymap, "tool_settings.vertex_paint.brush.size");
ed_keymap_paint_brush_radial_control(keymap, "vertex_paint", RC_COLOR | RC_COLOR_OVERRIDE | RC_ROTATION);
@@@ -1367,9 -1376,9 +1371,8 @@@
RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_gradient", LEFTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "type", WPAINT_GRADIENT_TYPE_LINEAR);
RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_weight_gradient", LEFTMOUSE, KM_PRESS, KM_ALT | KM_CTRL, 0)->ptr, "type", WPAINT_GRADIENT_TYPE_RADIAL);
- WM_keymap_add_item(keymap,
- "PAINT_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0);
- ed_keymap_paint_brush_switch(keymap, "weight_paint");
ed_keymap_paint_brush_size(keymap, "tool_settings.weight_paint.brush.size");
ed_keymap_paint_brush_radial_control(keymap, "weight_paint", RC_WEIGHT);
diff --cc source/blender/editors/sculpt_paint/paint_utils.c
index 99b319f422a,71b63ccbdff..697ffc32759
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@@ -133,14 -129,20 +134,15 @@@ bool paint_convert_bb_to_rect
/* Get four planes in object-space that describe the projection of
* screen_rect from screen into object-space (essentially converting a
* 2D screens-space bounding box into four 3D planes) */
- void paint_calc_redraw_planes(float planes[4][4],
- const ARegion *ar,
- Object *ob,
- const rcti *screen_rect)
+ void paint_calc_redraw_planes(
+ float planes[4][4],
+ const ARegion *ar,
- RegionView3D *rv3d,
+ Object *ob,
+ const rcti *screen_rect)
{
BoundBox bb;
- bglMats mats;
rcti rect;
- memset(&bb, 0, sizeof(BoundBox));
- view3d_get_transformation(ar, rv3d, ob, &mats);
-
/* use some extra space just in case */
rect = *screen_rect;
rect.xmin -= 2;
diff --cc source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index d19a1d3a189,1a37973cd7d..436f4ac5993
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@@ -642,10 -640,10 +643,11 @@@ static void gradientVertInit__mapFunc
* updating the mesh may move them about (entering feedback loop) */
if (BLI_BITMAP_TEST(grad_data->vert_visit, index) == 0) {
- DMGradient_vertStore *vs = &grad_data->vert_cache->elem[index];
- if (ED_view3d_project_float_object(grad_data->ar,
- co, vs->sco,
- V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
+ WPGradient_vertStore *vs = &grad_data->vert_cache->elem[index];
- if (ED_view3d_project_float_object(grad_data->ar,
- co, vs->sco,
- V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
++ if (ED_view3d_project_float_object(
++ grad_data->ar,
++ co, vs->sco,
++ V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
/* ok */
MDeformVert *dv = &me->dvert[index];
More information about the Bf-blender-cvs
mailing list