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:
authorTon Roosendaal <ton@blender.org>2012-12-21 21:47:50 +0400
committerTon Roosendaal <ton@blender.org>2012-12-21 21:47:50 +0400
commitc9b8839237e8841d1709b09bb373f6bb6bf5ec86 (patch)
tree00688b3cfe6346cdc65929a0b14c7ed1869f4920 /source/blender/editors/physics
parent4d8f340d3e481822d6d4a2fb0f87424e7b4dbad5 (diff)
Bug fix #33647
Particle combing didn't always respond as expected. The combed effect was depending on the center of object in view, instead of on the center of selected hairs. That made combing in certain close ups impossible. Same was actually true for transform tools for hairs! And even worse - there was an optimize break in calculating center which wasn't true even. Causing centers for transform to fail similar in other cases.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_edit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index e8af808956b..9dbc0f9a10c 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3476,11 +3476,16 @@ static int brush_edit_init(bContext *C, wmOperator *op)
PTCacheEdit *edit= PE_get_current(scene, ob);
ARegion *ar= CTX_wm_region(C);
BrushEdit *bedit;
-
+ float min[3], max[3];
+
if (pset->brushtype < 0)
return 0;
- initgrabz(ar->regiondata, ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]);
+ /* set the 'distance factor' for grabbing (used in comb etc) */
+ INIT_MINMAX(min, max);
+ PE_minmax(scene, min, max);
+ mid_v3_v3v3(min, min, max);
+ initgrabz(ar->regiondata, min[0], min[1], min[2]);
bedit= MEM_callocN(sizeof(BrushEdit), "BrushEdit");
bedit->first= 1;