Fix [#31977] Export Animated Mesh, terminate baking in fluid-sim
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 3 Jul 2012 12:40:19 +0000 (12:40 +0000)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 3 Jul 2012 12:40:19 +0000 (12:40 +0000)
* 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!

release/scripts/startup/bl_ui/properties_physics_fluid.py
source/blender/editors/physics/physics_fluid.c
source/blender/makesrna/intern/rna_fluidsim.c

index 751f3e18acc5faa37ad15011faeb61c951b910c2..a53c1c973366871f4262ba57b62f55b081200a1c 100644 (file)
@@ -117,10 +117,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
             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")
index b31e5c0aea39bb43388d733a8575e7e51a44dc79..2e58fa85a116ed494a51182ddd9ad62db4e6c3de 100644 (file)
@@ -567,11 +567,14 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
                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);
index 8dd1bc86ca178a56d5ecfae85c6b55204350ec47..f288b3ac3bb81d095e943353d64f30dad7eabac8 100644 (file)
@@ -461,8 +461,9 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
        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)