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:
authorAntony Riakiotakis <kalast@gmail.com>2013-12-19 07:09:42 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-12-19 07:09:42 +0400
commite915ecdfc4681b479c90349ef1d6338179071800 (patch)
tree745dcb7638fedeef32b347533e2ea89c0fd93994 /source/blender/editors/sculpt_paint
parent58ae499fc12449b35e0b9da06506f429a70e9744 (diff)
Fix T37387 VIEW3D_OT_view_selected in sculpt mode zooms far from
sculpted object if last sculpt stroke ends outside the mesh. Code here used the last true location which is invalid in that case, just reuse the average stroke location instead.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 6e11de878e3..4a1859c15f8 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -117,11 +117,6 @@ void ED_sculpt_force_update(bContext *C)
}
}
-float *ED_sculpt_get_last_stroke(struct Object *ob)
-{
- return (ob && ob->sculpt && ob->sculpt->last_stroke_valid) ? ob->sculpt->last_stroke : NULL;
-}
-
void ED_sculpt_get_average_stroke(Object *ob, float stroke[3])
{
if (ob->sculpt->last_stroke_valid && ob->sculpt->average_stroke_counter > 0) {
@@ -4575,7 +4570,7 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str
/* update last stroke position */
ob->sculpt->last_stroke_valid = 1;
- copy_v3_v3(ob->sculpt->last_stroke, ss->cache->true_location);
+ ED_sculpt_get_average_stroke(ob, ob->sculpt->last_stroke);
mul_m4_v3(ob->obmat, ob->sculpt->last_stroke);
sculpt_cache_free(ss->cache);