[Bf-blender-cvs] [f82717a0610] fluid-mantaflow: Mantaflow: Small fix related to mesh domain object and post merge cleanup
Sebastián Barschkis
noreply at git.blender.org
Wed May 22 00:26:08 CEST 2019
Commit: f82717a06107bc9321ea9b102cd1448033f70243
Author: Sebastián Barschkis
Date: Wed May 22 00:25:27 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBf82717a06107bc9321ea9b102cd1448033f70243
Mantaflow: Small fix related to mesh domain object and post merge cleanup
===================================================================
M intern/mantaflow/intern/FLUID.cpp
M source/blender/blenkernel/intern/smoke.c
M source/blender/makesrna/intern/rna_smoke.c
===================================================================
diff --git a/intern/mantaflow/intern/FLUID.cpp b/intern/mantaflow/intern/FLUID.cpp
index bbb67cc5cc4..fc85f62a00d 100644
--- a/intern/mantaflow/intern/FLUID.cpp
+++ b/intern/mantaflow/intern/FLUID.cpp
@@ -1223,13 +1223,13 @@ int FLUID::readConfiguration(SmokeModifierData *smd, int framenr)
NULL);
BLI_path_make_safe(cacheDir);
- if (!BLI_exists(cacheDir))
- return 0;
-
ss << "config_####" << dformat;
BLI_join_dirfile(targetFile, sizeof(targetFile), cacheDir, ss.str().c_str());
BLI_path_frame(targetFile, framenr, 0);
+ if (!BLI_exists(targetFile))
+ return 0;
+
gzFile gzf = gzopen(targetFile, "rb"); // do some compression
if (!gzf)
std::cerr << "readConfiguration: can't open file: " << targetFile << std::endl;
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 7690d6a60f9..88698ba4496 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -3549,7 +3549,7 @@ static Mesh *createLiquidGeometry(SmokeDomainSettings *sds, Mesh *orgmesh, Objec
MEM_freeN(normals);
- /* return early of no mesh vert velocities required */
+ /* return early if no mesh vert velocities required */
if ((sds->flags & FLUID_DOMAIN_USE_SPEED_VECTORS) == 0) {
return me;
}
@@ -4050,16 +4050,24 @@ struct Mesh *smokeModifier_do(
}
/* return generated geometry for adaptive domain */
+ Mesh *result = NULL;
if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain)
{
if (smd->domain->type == FLUID_DOMAIN_TYPE_LIQUID) {
- return createLiquidGeometry(smd->domain, me, ob);
+ result = createLiquidGeometry(smd->domain, me, ob);
}
if (smd->domain->type == FLUID_DOMAIN_TYPE_GAS) {
- return createSmokeGeometry(smd->domain, me, ob);
+ result = createSmokeGeometry(smd->domain, me, ob);
}
}
- return BKE_mesh_copy_for_eval(me, false);
+ else {
+ result = BKE_mesh_copy_for_eval(me, false);
+ }
+ /* XXX This is really not a nice hack, but until root of the problem is understood,
+ * this should be an acceptable workaround I think.
+ * See T58492 for details on the issue. */
+ result->texflag |= ME_AUTOSPACE;
+ return result;
}
static float calc_voxel_transp(
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 25e31403ff0..43a4ccb356b 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -474,9 +474,9 @@ static void rna_Smoke_cachetype_noise_set(struct PointerRNA *ptr, int value)
}
}
-static void rna_Smoke_guiding_parent_set(struct ReportList *UNUSED(reports),
- PointerRNA *ptr,
- PointerRNA value)
+static void rna_Smoke_guiding_parent_set(struct PointerRNA *ptr,
+ struct PointerRNA value,
+ struct ReportList *UNUSED(reports))
{
SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data;
Object *par = (Object *)value.data;
More information about the Bf-blender-cvs
mailing list