[Bf-blender-cvs] [d2fa566] fracture_modifier: centroid fix / point cloud fix, forgot to multiply with splinter matrix
Martin Felke
noreply at git.blender.org
Thu Oct 30 13:21:10 CET 2014
Commit: d2fa5668ae7bd86ebfa8f3cb1be3edd59c5b17e0
Author: Martin Felke
Date: Thu Oct 30 13:20:59 2014 +0100
Branches: fracture_modifier
https://developer.blender.org/rBd2fa5668ae7bd86ebfa8f3cb1be3edd59c5b17e0
centroid fix / point cloud fix, forgot to multiply with splinter matrix
===================================================================
M source/blender/blenkernel/intern/fracture.c
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index c2fa149..33a0cd9 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -87,9 +87,10 @@ static void add_shard(FracMesh *fm, Shard *s, float mat[4][4])
for (i = 0, mv = s->mvert; i < s->totvert; i++, mv++ )
{
mul_m4_v3(mat, mv->co);
- //mul_m4_v3(obj->obmat, mv->co);
}
+ mul_m4_v3(mat, s->centroid);
+
BLI_addtail(&fm->shard_map, s);
s->shard_id = fm->shard_count;
fm->shard_count++;
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index a9d3fa0..0f561e0 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -842,6 +842,11 @@ static void do_fracture(FractureModifierData *fracmd, ShardID id, Object *obj, D
invert_m4_m4(imat, mat);
invert_m4_m4(obj->imat, obj->obmat);
+ for (i = 0; i < points.totpoints; i++)
+ {
+ mul_m4_v3(imat, points.points[i].co);
+ }
+
for (i = 0, mv = mvert; i < dm->getNumVerts(dm); i++, mv++)
{
//mul_m4_v3(obj->imat, mv->co);
More information about the Bf-blender-cvs
mailing list