diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-05 21:05:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-05 21:05:55 +0300 |
commit | 1e40adddc7c15aa008670fcf387cda56fdef8479 (patch) | |
tree | 5b04f6bdf5655607d6fe2d55eb3f4b7bdbda1f57 /source/blender/editors | |
parent | bdfa652605b0932755a35fa8af02ccd049596847 (diff) |
2.5 Modifiers: mesh deform, boolean and decimation work again.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 6 | ||||
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_armature.h | 5 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 5 |
4 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 82843a49851..9847bdc3283 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -69,7 +69,7 @@ static void waitcursor(int val) {} static void progress_bar() {} static void start_progress_bar() {} static void end_progress_bar() {} -static void error() {} +static void error(char *str) { printf("error: %s\n", str); } /* ************* XXX *************** */ @@ -1698,7 +1698,7 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb) nlDeleteContext(context); } -void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd, float (*vertexcos)[3], int totvert, float cagemat[][4]) +void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd, float *vertexcos, int totvert, float cagemat[][4]) { MeshDeformBind mdb; MDefBindInfluence *inf; @@ -1714,7 +1714,7 @@ void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd, float memset(&mdb, 0, sizeof(MeshDeformBind)); /* get mesh and cage mesh */ - mdb.vertexcos= vertexcos; + mdb.vertexcos= (float(*)[3])vertexcos; mdb.totvert= totvert; mdb.cagedm= mesh_create_derived_no_deform(scene, mmd->object, NULL, CD_MASK_BAREMESH); diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h index 00c0aefaec7..1ee01561cd4 100644 --- a/source/blender/editors/armature/meshlaplacian.h +++ b/source/blender/editors/armature/meshlaplacian.h @@ -79,7 +79,7 @@ void rigid_deform_end(int cancel); /* Harmonic Coordinates */ void harmonic_coordinates_bind(struct Scene *scene, struct MeshDeformModifierData *mmd, - float (*vertexcos)[3], int totvert, float cagemat[][4]); + float *vertexcos, int totvert, float cagemat[][4]); #endif diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index 4898f70201e..5cc35d4ad77 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -42,6 +42,7 @@ struct ViewContext; struct RegionView3D; struct SK_Sketch; struct IDProperty; +struct MeshDeformModifierData; typedef struct EditBone { @@ -162,6 +163,10 @@ char * BIF_nameBoneTemplate(const struct bContext *C); void BDR_drawSketch(const struct bContext *vc); int BDR_drawSketchNames(struct ViewContext *vc); +/* meshlaplacian.c */ +void harmonic_coordinates_bind(struct Scene *scene, struct MeshDeformModifierData *mmd, + float *vertexcos, int totvert, float cagemat[][4]); + #endif /* ED_ARMATURE_H */ diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 1b0dc95480a..0683cb6842f 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -65,6 +65,7 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "ED_armature.h" #include "ED_screen.h" #include "WM_api.h" @@ -779,7 +780,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) int mode= mmd->modifier.mode; /* force modifier to run, it will call binding routine */ - mmd->needbind= 1; + mmd->bindfunc= harmonic_coordinates_bind; mmd->modifier.mode |= eModifierMode_Realtime; if(ob->type == OB_MESH) { @@ -796,7 +797,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) makeDispListCurveTypes(scene, ob, 0); } - mmd->needbind= 0; + mmd->bindfunc= NULL; mmd->modifier.mode= mode; } |