[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48531] trunk/blender: Fix [#31977] Export Animated Mesh, terminate baking in fluid-sim

Bastien Montagne montagne29 at wanadoo.fr
Tue Jul 3 14:40:24 CEST 2012


Revision: 48531
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48531
Author:   mont29
Date:     2012-07-03 12:40:19 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Fix [#31977] Export Animated Mesh, terminate baking in fluid-sim

* Elbeem exporter code now overrides user settings to No Slip in case the object is animated;
* UI of fluid obstacles now disables slip settings when export animated is enabled;
* Added in this later option's tooltip a mention that it enforces No Slip!

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
    trunk/blender/source/blender/editors/physics/physics_fluid.c
    trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-07-03 11:32:42 UTC (rev 48530)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-07-03 12:40:19 UTC (rev 48531)
@@ -117,10 +117,14 @@
             col.prop(fluid, "use_animated_mesh")
 
             col = split.column()
-            col.label(text="Slip Type:")
-            col.prop(fluid, "slip_type", text="")
+            subsplit = col.split()
+            subcol = subsplit.column()
+            if fluid.use_animated_mesh:
+                subcol.enabled = False
+            subcol.label(text="Slip Type:")
+            subcol.prop(fluid, "slip_type", text="")
             if fluid.slip_type == 'PARTIALSLIP':
-                col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+                subcol.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
 
             col.label(text="Impact:")
             col.prop(fluid, "impact_factor", text="Factor")

Modified: trunk/blender/source/blender/editors/physics/physics_fluid.c
===================================================================
--- trunk/blender/source/blender/editors/physics/physics_fluid.c	2012-07-03 11:32:42 UTC (rev 48530)
+++ trunk/blender/source/blender/editors/physics/physics_fluid.c	2012-07-03 12:40:19 UTC (rev 48531)
@@ -567,11 +567,14 @@
 		if (deform) {
 			fsmesh.channelSizeVertices = length;
 			fsmesh.channelVertices = fobj->VertexCache;
-				
-			// remove channels
+			
+			/* remove channels */
 			fsmesh.channelTranslation      = 
 			fsmesh.channelRotation         = 
-			fsmesh.channelScale            = NULL; 
+			fsmesh.channelScale            = NULL;
+			
+			/* Override user settings, only noslip is supported here! */
+			fsmesh.obstacleType = FLUIDSIM_OBSTACLE_NOSLIP;
 		}
 		
 		elbeemAddMesh(&fsmesh);

Modified: trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c	2012-07-03 11:32:42 UTC (rev 48530)
+++ trunk/blender/source/blender/makesrna/intern/rna_fluidsim.c	2012-07-03 12:40:19 UTC (rev 48531)
@@ -461,8 +461,9 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_ui_text(prop, "Export Animated Mesh",
-	                         "Export this mesh as an animated one (slower, only use if really necessary [e.g. "
-	                         "armatures or parented objects], animated pos/rot/scale F-Curves do not require it)");
+	                         "Export this mesh as an animated one (slower and enforces No Splip, only use if really "
+	                         "necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves "
+	                         "do not require it)");
 }
 
 static void rna_def_fluidsim_active(StructRNA *srna)




More information about the Bf-blender-cvs mailing list