Initial GUI implementation, yet not functional
[blender.git] / source / blender / src / buttons_object.c
index ba409723784c5b44673d3aa3d2ad7f22337eb8ee..9967e69fe27a639c32f4fc3a6b0a6ab035b61b43 100644 (file)
@@ -4950,9 +4950,11 @@ static void object_panel_fluidsim(Object *ob)
                        uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE ,"Obstacle",         230, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OBSTACLE,20.0, 3.0, "Object is a fixed obstacle.");
                        yline -= lineHeight;
 
-                       uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE    ,"Inflow",           90, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_INFLOW,  20.0, 4.0, "Object adds fluid to the simulation.");
-                       uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE    ,"Outflow",   160, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OUTFLOW, 20.0, 5.0, "Object removes fluid from the simulation.");
-                       uiDefButS(block, ROW, B_FLUIDSIM_MAKEPART ,"Particle",   230, yline, 70,objHeight, &fss->type, 15.0, OB_FLUIDSIM_PARTICLE,20.0, 3.0, "Object is made a particle system to display particles generated by a fluidsim domain object.");
+                       uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE    ,"Inflow",           90, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_INFLOW,  20.0, 4.0, "Object adds fluid to the simulation.");
+                       uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE    ,"Outflow",   142, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_OUTFLOW, 20.0, 5.0, "Object removes fluid from the simulation.");
+                       uiDefButS(block, ROW, B_FLUIDSIM_MAKEPART ,"Particle",   194, yline, 52,objHeight, &fss->type, 15.0, OB_FLUIDSIM_PARTICLE,20.0, 3.0, "Object is made a particle system to display particles generated by a fluidsim domain object.");
+                       
+                       uiDefButS(block, ROW, B_FLUIDSIM_CHANGETYPE ,"Control",  246, yline, 54,objHeight, &fss->type, 15.0, OB_FLUIDSIM_CONTROL,20.0, 3.0, "Object is made a fluid control mesh, which influences the fluid.");
                        uiBlockEndAlign(block);
                        yline -= lineHeight;
                        yline -= 2*separateHeight;
@@ -5211,6 +5213,24 @@ static void object_panel_fluidsim(Object *ob)
                                yline -= lineHeight;
                        } // disabled for now...
 
+                       }
+                       else if(fss->type == OB_FLUIDSIM_CONTROL) {
+                               
+                               uiDefBut(block, LABEL, 0, "Attraction force:", 0,yline,300,20, NULL, 0.0, 0, 0, 0, "");
+                               
+                               yline -= lineHeight;
+                               
+                               uiDefButF(block, NUM, B_DIFF, "Strength:", 0, yline,150,20, &fss->attractforceStrength, 0.0, 2.0,   10,0, "");
+                               uiDefButF(block, NUM, B_DIFF, "Radius:", 150, yline,150,20, &fss->attractforceRadius, 0.0, 2.0,   10,0, "");
+                               
+                               yline -= lineHeight;
+                               
+                               uiDefBut(block, LABEL, 0, "Velocity force:", 0,yline,300,20, NULL, 0.0, 0, 0, 0, "");
+                               
+                               yline -= lineHeight;
+                               
+                               uiDefButF(block, NUM, B_DIFF, "Strength:", 0, yline,150,20, &fss->velocityforceStrength, 0.0, 2.0,   10,0, "");
+                               uiDefButF(block, NUM, B_DIFF, "Radius:", 150, yline,150,20, &fss->velocityforceRadius, 0.0, 2.0,   10,0, "");
                        }
                        else {
                                yline -= lineHeight + 5;