diff options
author | Janne Karhu <jhkarh@gmail.com> | 2009-09-11 04:23:08 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2009-09-11 04:23:08 +0400 |
commit | 71907c7e4c7c20575edcb50ec29025284a9f9bed (patch) | |
tree | 483aa2d7b61c5d70926e672dfdf4ba343b7c1a71 /source/blender/editors/space_buttons/buttons_ops.c | |
parent | d1314c3db541a8919eb8414d1718bdee273a8a9f (diff) |
Disconnect hair was using wrong derived mesh for the space conversion.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_ops.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index bc9b05dc12e..176611377eb 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -729,7 +729,6 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) PTCacheEdit *edit = psys->edit; PTCacheEditPoint *point = edit ? edit->points : NULL; PTCacheEditKey *ekey = NULL; - DerivedMesh *dm = NULL; HairKey *key; int i, k; float hairmat[4][4]; @@ -740,18 +739,13 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) if(!psys->part || psys->part->type != PART_HAIR) return; - if(psmd->dm->deformedOnly) - dm= psmd->dm; - else - dm= mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); - for(i=0; i<psys->totpart; i++,pa++) { if(point) { ekey = point->keys; point++; } - psys_mat_hair_to_global(ob, dm, psys->part->from, pa, hairmat); + psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat); for(k=0,key=pa->hair; k<pa->totkey; k++,key++) { Mat4MulVecfl(hairmat,key->co); @@ -765,9 +759,6 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) psys_free_path_cache(psys, psys->edit); - if(!psmd->dm->deformedOnly) - dm->release(dm); - psys->flag |= PSYS_GLOBAL_HAIR; PE_update_object(scene, ob, 0); |