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:
authorDaniel Dunbar <daniel@zuster.org>2005-07-17 09:20:57 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-17 09:20:57 +0400
commite1c653c5c3a31959a7a758d98821833f68b922dc (patch)
tree0db9ab7ef628174c7462f6b92c04c22001c6c78d /source/blender/src/editdeform.c
parente6f45278137567e697327ccdab3099d0145117dd (diff)
- convert vertex_duplilist to use mesh_get_derived_deform
- convert object_apply_deform to use mesh_get_derived_deform - convert build_particle_system to use mesh_get_derived_deform - remove apply option from mesh_modifier What do you know, this leaves only one callsite for mesh_modifier and one "user" site for DL_VERTS...
Diffstat (limited to 'source/blender/src/editdeform.c')
-rw-r--r--source/blender/src/editdeform.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c
index 0041974fab9..1c046a6f4d9 100644
--- a/source/blender/src/editdeform.c
+++ b/source/blender/src/editdeform.c
@@ -44,6 +44,8 @@
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_deform.h"
#include "BKE_displist.h"
@@ -611,9 +613,17 @@ void object_apply_deform(Object *ob)
if(me->id.us>1) {
err= "Can't apply deformation to Mesh with other users";
} else {
- mesh_modifier(ob, 's'); // start
- mesh_modifier(ob, 'a'); // apply and end
- freedisplist(&ob->disp);
+ int i, dmNeedsFree;
+ DerivedMesh *dm = mesh_get_derived_deform(ob, &dmNeedsFree);
+
+ for (i=0; i<me->totvert; i++) {
+ dm->getVertCo(dm, i, me->mvert[i].co);
+ }
+
+ if (dmNeedsFree)
+ dm->release(dm);
+
+ DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
}
}
else if (ob->type==OB_CURVE || ob->type==OB_SURF) {