[Bf-blender-cvs] [006d6cf] fracture_modifier: fix: greasepencil by edges did not take object transformation into account properly
Martin Felke
noreply at git.blender.org
Thu Mar 5 20:24:03 CET 2015
Commit: 006d6cfaf40dd8e915581b33a205ef525aaad2f9
Author: Martin Felke
Date: Thu Mar 5 20:23:41 2015 +0100
Branches: fracture_modifier
https://developer.blender.org/rB006d6cfaf40dd8e915581b33a205ef525aaad2f9
fix: greasepencil by edges did not take object transformation into account properly
===================================================================
M source/blender/blenkernel/intern/fracture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 07f6fc8..cf83791 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -819,17 +819,14 @@ static void parse_cell_neighbors(cell c, int *neighbors, int totpoly)
}
}
-static void stroke_to_faces(FractureModifierData *fmd, Object* ob, BMesh** bm, bGPDstroke *gps, int inner_material_index)
+static void stroke_to_faces(FractureModifierData *fmd, BMesh** bm, bGPDstroke *gps, int inner_material_index)
{
BMVert *lastv1 = NULL;
BMVert *lastv2 = NULL;
int p = 0;
- float imat[4][4];
float thresh = (float)fmd->grease_decimate / 100.0f;
float half[3] = {0, 0, 1};
- invert_m4_m4(imat, ob->obmat);
-
for (p = 0; p < gps->totpoints; p++) {
if ((BLI_frand() < thresh) || (p == 0) || (p == gps->totpoints-1)) {
@@ -840,7 +837,6 @@ static void stroke_to_faces(FractureModifierData *fmd, Object* ob, BMesh** bm, b
point[1] = gps->points[p].y;
point[2] = gps->points[p].z;
- mul_m4_v3(imat, point);
v1 = BM_vert_create(*bm, point, NULL, 0);
if (lastv1)
@@ -1036,7 +1032,7 @@ void BKE_fracture_shard_by_greasepencil(FractureModifierData *fmd, Object *obj,
/*create stroke mesh */
- stroke_to_faces(fmd, obj, &bm, gps, inner_material_index);
+ stroke_to_faces(fmd, &bm, gps, inner_material_index);
dm = CDDM_from_bmesh(bm, true);
#if 0
{
More information about the Bf-blender-cvs
mailing list