From fb4b16b799ca514a9cc30d19f8e2274bf912246d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Apr 2010 11:39:40 +0000 Subject: [PATCH] "Fix" #20225: mesh deform surface modifier problems. This mode was an experiment and turn out to work poorly because it does not preserve rotations, so I've just removed the option now. Alternative is to use a solidify modifier on the cage mesh, which will usually give better results. --- release/scripts/ui/properties_data_modifier.py | 1 - source/blender/editors/armature/meshlaplacian.c | 6 ++++++ source/blender/makesrna/intern/rna_modifier.c | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index 3ab102a803b..332bea61364 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -368,7 +368,6 @@ class DATA_PT_modifiers(DataButtonsPanel): sub = col.column() sub.label(text="Object:") sub.prop(md, "object", text="") - sub.prop(md, "mode", text="") sub.active = not md.is_bound if wide_ui: col = split.column() diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 3190d8ad576..c5e96dd5fd4 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -1886,6 +1886,7 @@ static void harmonic_coordinates_bind(Scene *scene, MeshDeformModifierData *mmd, BLI_memarena_free(mdb->memarena); } +#if 0 static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd, MeshDeformBind *mdb) { LaplacianSystem *sys; @@ -1953,6 +1954,7 @@ static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifie mmd->bindweights= mdb->weights; } +#endif void mesh_deform_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd, float *vertexcos, int totvert, float cagemat[][4]) { @@ -1981,10 +1983,14 @@ void mesh_deform_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd mul_v3_m4v3(mdb.vertexcos[a], mdb.cagemat, vertexcos + a*3); /* solve */ +#if 0 if(mmd->mode == MOD_MDEF_VOLUME) harmonic_coordinates_bind(scene, mmd, &mdb); else heat_weighting_bind(scene, dm, mmd, &mdb); +#else + harmonic_coordinates_bind(scene, mmd, &mdb); +#endif /* assign bind variables */ mmd->bindcos= (float*)mdb.cagecos; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 14be3665adc..e789d2d0c46 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1487,10 +1487,12 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; +#if 0 static EnumPropertyItem prop_mode_items[] = { {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"}, {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"}, {0, NULL, 0, NULL, NULL}}; +#endif srna= RNA_def_struct(brna, "MeshDeformModifier", "Modifier"); RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes"); @@ -1530,10 +1532,12 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); +#if 0 prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_mode_items); RNA_def_property_ui_text(prop, "Mode", "Method of binding vertices are bound to cage mesh"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); +#endif } static void rna_def_modifier_particlesystem(BlenderRNA *brna)