[Bf-blender-cvs] [24d394e] fluid-mantaflow: added new border collision option: horizontally open (useful for liquids)
Sebastián Barschkis
noreply at git.blender.org
Mon Aug 8 01:26:33 CEST 2016
Commit: 24d394efa83f0b18c7a5439dbfb9339f44364ab1
Author: Sebastián Barschkis
Date: Wed Aug 3 12:57:36 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB24d394efa83f0b18c7a5439dbfb9339f44364ab1
added new border collision option: horizontally open (useful for liquids)
===================================================================
M intern/mantaflow/intern/SMOKE.cpp
M source/blender/makesdna/DNA_smoke_types.h
M source/blender/makesrna/intern/rna_smoke.c
===================================================================
diff --git a/intern/mantaflow/intern/SMOKE.cpp b/intern/mantaflow/intern/SMOKE.cpp
index 70a8c77..097e9f6 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -473,11 +473,13 @@ std::string SMOKE::getRealValue(const std::string& varName, SmokeModifierData *
if (smd->domain->manta_solver_res == 2) {
if (smd->domain->border_collisions == SM_BORDER_OPEN) ss << "xXyY";
else if (smd->domain->border_collisions == SM_BORDER_VERTICAL) ss << "yY";
+ else if (smd->domain->border_collisions == SM_BORDER_VERTICAL) ss << "xX";
else if (smd->domain->border_collisions == SM_BORDER_CLOSED) ss << "";
}
if (smd->domain->manta_solver_res == 3) {
if (smd->domain->border_collisions == SM_BORDER_OPEN) ss << "xXyYzZ";
else if (smd->domain->border_collisions == SM_BORDER_VERTICAL) ss << "zZ";
+ else if (smd->domain->border_collisions == SM_BORDER_HORIZONTAL) ss << "xXyY";
else if (smd->domain->border_collisions == SM_BORDER_CLOSED) ss << "";
}
} else if (varName == "RES")
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 0c06ed5..e8f5148 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -63,9 +63,10 @@ enum {
#define SM_CACHE_HEAVY 1
/* domain border collision */
-#define SM_BORDER_OPEN 0
-#define SM_BORDER_VERTICAL 1
-#define SM_BORDER_CLOSED 2
+#define SM_BORDER_OPEN 0
+#define SM_BORDER_VERTICAL 1
+#define SM_BORDER_CLOSED 2
+#define SM_BORDER_HORIZONTAL 3
/* viewport preview types */
#define SM_VIEWPORT_GEOM 0
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 5243b05..f649551 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -461,6 +461,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open",
"Smoke doesn't collide with top and bottom sides"},
{SM_BORDER_CLOSED, "BORDERCLOSED", 0, "Collide All", "Smoke collides with every side"},
+ {SM_BORDER_HORIZONTAL, "BORDERHORIZONTAL", 0, "Horizontally Open", "Smoke doesn't collide with left, right, front and back sides"},
{0, NULL, 0, NULL, NULL}
};
More information about the Bf-blender-cvs
mailing list