"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.
This commit is contained in:
Brecht Van Lommel 2010-04-02 11:39:40 +00:00
parent b1a0c86163
commit fb4b16b799
3 changed files with 10 additions and 1 deletions

@ -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()

@ -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;

@ -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)