[Bf-blender-cvs] [e8938ee] fluid-mantaflow: idea for mantaflow liquids api entry point

Sebastián Barschkis noreply at git.blender.org
Mon May 23 23:45:54 CEST 2016


Commit: e8938ee9dcc43ce75a5e0ef4fa5576f29110638a
Author: Sebastián Barschkis
Date:   Sat May 14 11:08:18 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBe8938ee9dcc43ce75a5e0ef4fa5576f29110638a

idea for mantaflow liquids api entry point

===================================================================

M	source/blender/editors/physics/physics_fluid.c

===================================================================

diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 038e2ff..fb6c22b 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -71,6 +71,7 @@
 	#include "../../../../intern/smoke/extern/smoke_API.h"
 #else
 	#include "../../../../intern/mantaflow/extern/manta_smoke_API.h"
+	#include "../../../../intern/mantaflow/extern/manta_liquid_API.h"
 #endif
 #include "DNA_smoke_types.h"
 
@@ -849,6 +850,7 @@ static void fluidsim_delete_until_lastframe(FluidsimSettings *fss, const char *r
 	return;
 }
 
+#ifndef WITH_MANTA
 static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job)
 {
 	Scene *scene= CTX_data_scene(C);
@@ -1084,6 +1086,19 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
 	// elbeemFree();
 	return 1;
 }
+#else /* WITH_MANTA */
+static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job)
+{
+//	Scene *scene= CTX_data_scene(C);
+//	int currentFrame = scene->r.cfra;
+	
+	struct LIQUID *liquid = liquid_init();
+	for (int i = 0; i < 100; ++i)
+		liquid_step(liquid, i);
+
+	return 1;
+}
+#endif /* WITH_MANTA */
 
 static void UNUSED_FUNCTION(fluidsimFreeBake)(Object *UNUSED(ob))
 {




More information about the Bf-blender-cvs mailing list