[Bf-blender-cvs] [a468002] fracture_modifier: dont use BLI_findlink for first shard (can access directly) and load shards into correct "parent" struct
Martin Felke
noreply at git.blender.org
Fri Oct 10 16:30:14 CEST 2014
Commit: a468002406fa630185788ee50c76f97de07a4eef
Author: Martin Felke
Date: Fri Oct 10 16:29:33 2014 +0200
Branches: fracture_modifier
https://developer.blender.org/rBa468002406fa630185788ee50c76f97de07a4eef
dont use BLI_findlink for first shard (can access directly) and load shards into correct "parent" struct
===================================================================
M source/blender/blenkernel/intern/fracture.c
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 9ad2142..e01b75d 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -805,10 +805,10 @@ static DerivedMesh *create_dm(FractureModifierData *fmd, bool doCustomData)
if (doCustomData && shard_count > 0) {
Shard *s;
if (fmd->shards_to_islands) {
- s = BLI_findlink(&fmd->islandShards, 0);
+ s = (Shard *)fmd->islandShards.first;
}
else {
- s = BLI_findlink(&fmd->frac_mesh->shard_map, 0);
+ s = (Shard *)fmd->frac_mesh->shard_map.first;
}
CustomData_merge(&s->vertData, &result->vertData, CD_MASK_MDEFORMVERT, CD_CALLOC, num_verts);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9d1852c..ca3b6f3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4994,8 +4994,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
Shard *s;
int count = 0;
- link_list(fd, &fm->shard_map);
- for (s = fm->shard_map.first; s; s = s->next) {
+ link_list(fd, &fmd->frac_mesh->shard_map);
+ for (s = fmd->frac_mesh->shard_map.first; s; s = s->next) {
read_shard(fd, &s);
}
More information about the Bf-blender-cvs
mailing list