Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-09-11 16:19:52 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:29:59 +0300
commitd115bdb50510c2912ffedd22100e38a646827b52 (patch)
treef50461760144f8c6d473c4de8ff5ea79e662e477 /source/blender/modifiers/intern
parentda01c884e54bc1546b2243c3517d50ff961859e9 (diff)
Added new data in the cloth modifier for hair root information.
This will allow us to implement moving reference frames for hair and make "fictitious" forces optional, aiding in creating stable and controllable hair systems. Adding data in this place is a nasty hack, but it's too difficult to encode as a DM data layer and the whole cloth modifier/DM intermediate data copying for hair should be removed anyway.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 15a73c0a34d..5c5e38f3444 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -178,6 +178,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tclmd->point_cache = BKE_ptcache_add(&tclmd->ptcaches);
tclmd->point_cache->step = 1;
tclmd->clothObject = NULL;
+ tclmd->roots = NULL;
tclmd->debug_data = NULL;
}
@@ -207,6 +208,9 @@ static void freeData(ModifierData *md)
BKE_ptcache_free_list(&clmd->ptcaches);
clmd->point_cache = NULL;
+ if (clmd->roots)
+ MEM_freeN(clmd->roots);
+
BKE_sim_debug_data_free(clmd->debug_data);
}
}