[Bf-blender-cvs] [2d1c068] fracture_modifier: argh, missed some default setting for FM for grease pencil edge mode, before this fix no fracture at all was performed, and added bmesh tool flag for grease pencil fracture, too

Martin Felke noreply at git.blender.org
Wed Nov 2 20:41:10 CET 2016


Commit: 2d1c068048bc338c6b3cd60959dd9a93be8cda63
Author: Martin Felke
Date:   Wed Nov 2 19:44:14 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rB2d1c068048bc338c6b3cd60959dd9a93be8cda63

argh, missed some default setting for FM for grease pencil edge mode, before this fix no fracture at all was performed, and added bmesh tool flag for grease pencil fracture, too

===================================================================

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 70a4306..c3176a5 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -1417,7 +1417,7 @@ void BKE_fracture_shard_by_greasepencil(FractureModifierData *fmd, Object *obj,
 		for (gpl = obj->gpd->layers.first; gpl; gpl = gpl->next) {
 			for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
 				for (gps = gpf->strokes.first; gps; gps = gps->next) {
-					BMesh *bm = BM_mesh_create(&bm_mesh_allocsize_default, &((struct BMeshCreateParams){.use_toolflags = false,}));
+					BMesh *bm = BM_mesh_create(&bm_mesh_allocsize_default, &((struct BMeshCreateParams){.use_toolflags = true,}));
 					DerivedMesh *dm = NULL;
 
 
@@ -1428,8 +1428,8 @@ void BKE_fracture_shard_by_greasepencil(FractureModifierData *fmd, Object *obj,
 					{
 						/*create debug mesh*/
 						Object* o;
-						o = BKE_object_add(G.main, fmd->modifier.scene, OB_MESH);
-						BM_mesh_bm_to_me(bm, o->data, true);
+						o = BKE_object_add(G.main, fmd->modifier.scene, OB_MESH, "DUMMY");
+						BM_mesh_bm_to_me(bm, o->data, (&(struct BMeshToMeshParams){0}));
 					}
 #endif
 
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 6e0c8f0..5a874c4 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -226,6 +226,7 @@ static void initData(ModifierData *md)
 	fmd->dynamic_percentage = 0.0f;
 	fmd->dynamic_new_constraints = MOD_FRACTURE_ALL_DYNAMIC_CONSTRAINTS;
 	fmd->dynamic_min_size = 1.0f;
+	fmd->keep_cutter_shards = MOD_FRACTURE_KEEP_BOTH;
 }
 
 //XXX TODO, freeing functionality should be in BKE too
@@ -1797,6 +1798,7 @@ static void copyData(ModifierData *md, ModifierData *target)
 	trmd->dynamic_percentage = rmd->dynamic_percentage;
 	trmd->dynamic_new_constraints = rmd->dynamic_new_constraints;
 	trmd->dynamic_min_size = rmd->dynamic_min_size;
+	trmd->keep_cutter_shards = rmd->keep_cutter_shards;
 }
 
 //XXXX TODO, is BB really useds still ? aint there exact volume calc now ?




More information about the Bf-blender-cvs mailing list