[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28071] branches/render25: Render Branch: restore surface mode for mesh deform modifier, seems we are

Brecht Van Lommel brecht at blender.org
Wed Apr 7 16:01:59 CEST 2010


Revision: 28071
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28071
Author:   blendix
Date:     2010-04-07 16:01:59 +0200 (Wed, 07 Apr 2010)

Log Message:
-----------
Render Branch: restore surface mode for mesh deform modifier, seems we are
using it in some places still, intentionally only committed in this branch.

Modified Paths:
--------------
    branches/render25/release/scripts/ui/properties_data_modifier.py
    branches/render25/source/blender/editors/armature/meshlaplacian.c
    branches/render25/source/blender/makesrna/intern/rna_modifier.c

Modified: branches/render25/release/scripts/ui/properties_data_modifier.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_modifier.py	2010-04-07 11:27:59 UTC (rev 28070)
+++ branches/render25/release/scripts/ui/properties_data_modifier.py	2010-04-07 14:01:59 UTC (rev 28071)
@@ -369,6 +369,7 @@
         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()
@@ -386,15 +387,16 @@
         else:
             layout.operator("object.meshdeform_bind", text="Bind")
 
-            split = layout.split()
+            if md.mode == 'VOLUME':
+                split = layout.split()
 
-            col = split.column()
-            col.prop(md, "precision")
-
-            if wide_ui:
                 col = split.column()
-            col.prop(md, "dynamic")
+                col.prop(md, "precision")
 
+                if wide_ui:
+                    col = split.column()
+                col.prop(md, "dynamic")
+
     def MIRROR(self, layout, ob, md, wide_ui):
         layout.prop(md, "merge_limit")
         if wide_ui:

Modified: branches/render25/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- branches/render25/source/blender/editors/armature/meshlaplacian.c	2010-04-07 11:27:59 UTC (rev 28070)
+++ branches/render25/source/blender/editors/armature/meshlaplacian.c	2010-04-07 14:01:59 UTC (rev 28071)
@@ -1884,7 +1884,6 @@
 	BLI_memarena_free(mdb->memarena);
 }
 
-#if 0
 static void heat_weighting_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd, MeshDeformBind *mdb)
 {
 	LaplacianSystem *sys;
@@ -1952,7 +1951,6 @@
 
 	mmd->bindweights= mdb->weights;
 }
-#endif
 
 void mesh_deform_bind(Scene *scene, DerivedMesh *dm, MeshDeformModifierData *mmd, float *vertexcos, int totvert, float cagemat[][4])
 {
@@ -1981,14 +1979,10 @@
 		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;

Modified: branches/render25/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_modifier.c	2010-04-07 11:27:59 UTC (rev 28070)
+++ branches/render25/source/blender/makesrna/intern/rna_modifier.c	2010-04-07 14:01:59 UTC (rev 28071)
@@ -1488,12 +1488,10 @@
 {
 	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");
@@ -1533,12 +1531,10 @@
 	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)





More information about the Bf-blender-cvs mailing list