[Bf-blender-cvs] [9168afa] fracture_modifier: small fix for multiple fracture settings (but, other files still dont work with it, investigating...
Martin Felke
noreply at git.blender.org
Sat Oct 17 15:49:49 CEST 2015
Commit: 9168aface9cce6199ba130ce15e2579ae8e333b1
Author: Martin Felke
Date: Sat Oct 17 15:47:03 2015 +0200
Branches: fracture_modifier
https://developer.blender.org/rB9168aface9cce6199ba130ce15e2579ae8e333b1
small fix for multiple fracture settings (but, other files still dont work with it, investigating...
===================================================================
M source/blender/modifiers/intern/MOD_fracture.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 8d0a6a9..fb4fb03 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -3998,24 +3998,23 @@ static void do_prehalving(FractureModifierData *fmd, Object* ob, DerivedMesh* de
/* dupe shards ... stupid listbases */
for (s = fmd->islandShards.first; s; s = s->next)
{
- if ((s->shard_id == fmd->active_setting) && fmd->refresh || (!fmd->refresh))
+ MDeformVert *dvert = NULL;
+ Shard *t = copy_shard(s);
+
+ /*set ID properly...*/
+ dvert = CustomData_get(&s->vertData, 0, CD_MDEFORMVERT);
+ if (dvert && dvert->dw)
+ {
+ t->setting_id = dvert->dw->def_nr;
+ }
+ else
{
- MDeformVert *dvert = NULL;
- Shard *t = copy_shard(s);
+ t->setting_id = -1;
+ }
+ if (((t->setting_id == fmd->active_setting) && fmd->refresh) || (!fmd->refresh))
+ {
BLI_addtail(&fmd->frac_mesh->shard_map, t);
-
- /*set ID properly...*/
- dvert = CustomData_get(&s->vertData, 0, CD_MDEFORMVERT);
- if (dvert && dvert->dw)
- {
- t->setting_id = dvert->dw->def_nr;
- }
- else
- {
- t->setting_id = -1;
- }
-
printf("Adding shard: %d %d \n", t->shard_id, t->setting_id);
}
}
More information about the Bf-blender-cvs
mailing list