Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-09 05:56:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-09 05:56:49 +0300
commit9b9861578d9f9e61ecdb0d0753df5df1e376ecb7 (patch)
tree34fc6ad7955b7be37ca3120247aa80aab5f7c9e8 /source/blender
parent518d59970df80fa5ad75c2cb5e5093826f175b29 (diff)
parent8f9386596fb0471c972921e6543b3a0adc3ffb3d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/CMakeLists.txt2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c25
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c2
3 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index 94f377fb35e..523215da29e 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -70,7 +70,9 @@ set(SRC
view2d.c
view2d_ops.c
+ interface_eyedropper_intern.h
interface_intern.h
+ interface_regions_intern.h
)
if(WITH_INTERNATIONAL)
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index d6b279008f0..5b59de06d0a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4597,19 +4597,17 @@ static bool sculpt_any_smooth_mode(const Brush *brush,
(brush->mask_tool == BRUSH_MASK_SMOOTH)));
}
-static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob)
+static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob, const Brush *brush)
{
SculptSession *ss = ob->sculpt;
if (ss->kb || ss->modifiers_active) {
EvaluationContext eval_ctx;
- Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Brush *brush = BKE_paint_brush(&sd->paint);
-
CTX_data_eval_ctx(C, &eval_ctx);
-
- BKE_sculpt_update_mesh_elements(&eval_ctx, CTX_data_scene(C), sd, ob,
- sculpt_any_smooth_mode(brush, ss->cache, 0), false);
+ Scene *scene = CTX_data_scene(C);
+ Sculpt *sd = scene->toolsettings->sculpt;
+ bool need_pmap = sculpt_any_smooth_mode(brush, ss->cache, 0);
+ BKE_sculpt_update_mesh_elements(&eval_ctx, scene, sd, ob, need_pmap, false);
}
}
@@ -4738,7 +4736,9 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2])
cache = ss->cache;
original = (cache) ? cache->original : 0;
- sculpt_stroke_modifiers_check(C, ob);
+ const Brush *brush = BKE_paint_brush(BKE_paint_get_active_from_context(C));
+
+ sculpt_stroke_modifiers_check(C, ob, brush);
depth = sculpt_raycast_init(&vc, mouse, ray_start, ray_end, ray_normal, original);
@@ -4764,7 +4764,6 @@ bool sculpt_stroke_get_location(bContext *C, float out[3], const float mouse[2])
}
if (hit == false) {
- const Brush *brush = BKE_paint_brush(BKE_paint_get_active_from_context(C));
if (ELEM(brush->falloff_shape, PAINT_FALLOFF_SHAPE_TUBE)) {
SculptFindNearestToRayData srd = {
.original = original,
@@ -4955,7 +4954,7 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *UNUSED(st
SculptSession *ss = ob->sculpt;
const Brush *brush = BKE_paint_brush(&sd->paint);
- sculpt_stroke_modifiers_check(C, ob);
+ sculpt_stroke_modifiers_check(C, ob, brush);
sculpt_update_cache_variants(C, sd, ob, itemptr);
sculpt_restore_mesh(sd, ob);
@@ -5030,7 +5029,7 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str
BLI_assert(brush == ss->cache->brush); /* const, so we shouldn't change. */
ups->draw_inverted = false;
- sculpt_stroke_modifiers_check(C, ob);
+ sculpt_stroke_modifiers_check(C, ob, brush);
/* Alt-Smooth */
if (ss->cache->alt_smooth) {
@@ -5855,7 +5854,9 @@ static void sample_detail(bContext *C, int ss_co[2])
sd = CTX_data_tool_settings(C)->sculpt;
ob = vc.obact;
- sculpt_stroke_modifiers_check(C, ob);
+ Brush *brush = BKE_paint_brush(&sd->paint);
+
+ sculpt_stroke_modifiers_check(C, ob, brush);
depth = sculpt_raycast_init(&vc, mouse, ray_start, ray_end, ray_normal, false);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index cb0c5bd3717..e1163fd3207 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2785,7 +2785,7 @@ static int sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op)
float facx = BLI_rcti_size_x(&v2d->mask) / winx;
float facy = BLI_rcti_size_y(&v2d->mask) / winy;
- BLI_rctf_resize(&v2d->cur, floorf(winx * facx / ratio + 0.5f), floorf(winy * facy / ratio + 0.5f));
+ BLI_rctf_resize(&v2d->cur, ceilf(winx * facx / ratio + 0.5f), ceilf(winy * facy / ratio + 0.5f));
ED_region_tag_redraw(CTX_wm_region(C));