Commit: edd75f7e17e3d4e57b95b9c2bacfb8eaa21c5a44 Author: Sebastián Barschkis Date: Fri Feb 23 23:39:20 2018 +0100 Branches: fluid-mantaflow https://developer.blender.org/rBedd75f7e17e3d4e57b95b9c2bacfb8eaa21c5a44
Merge branch 'master' into fluid-mantaflow =================================================================== =================================================================== diff --cc release/datafiles/locale index 64dba5c3cd0,469c949d1ca..d3349b42856 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@@ -1,1 -1,1 +1,1 @@@ - Subproject commit 64dba5c3cd055e710f01c911b22a4c2694196d7e -Subproject commit 469c949d1ca882be19daa128842f813b72a944d8 ++Subproject commit d3349b42856d00c278f72f2a5909a6c96b9cdb5e diff --cc release/scripts/addons index 0ec059ad19b,c88411ff777..31e5c6b980a --- a/release/scripts/addons +++ b/release/scripts/addons @@@ -1,1 -1,1 +1,1 @@@ - Subproject commit 0ec059ad19b88b1aaa2987b0e7355ad2dc91328b -Subproject commit c88411ff7776a2db5d6ef6117a1b2faa42a95611 ++Subproject commit 31e5c6b980a276850c0da11fab42403ab496a534 diff --cc source/blender/blenkernel/intern/smoke.c index 0b25fa0123a,86e69e68c11..8e13479f80b --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@@ -824,12 -735,13 +824,15 @@@ typedef struct ObstaclesFromDMData bool has_velocity; float *vert_vel; float *velocityX, *velocityY, *velocityZ; - int *num_obstacles; + int *num_objects; + float *distances_map; + float surface_thickness; } ObstaclesFromDMData; - static void obstacles_from_derivedmesh_task_cb(void *userdata, const int z) + static void obstacles_from_derivedmesh_task_cb( + void *__restrict userdata, + const int z, + const ParallelRangeTLS *__restrict UNUSED(tls)) { ObstaclesFromDMData *data = userdata; SmokeDomainSettings *sds = data->sds; @@@ -959,12 -866,18 +962,17 @@@ static void obstacles_from_derivedmesh if (bvhtree_from_mesh_looptri(&treeData, dm, 0.0f, 4, 6)) { ObstaclesFromDMData data = { .sds = sds, .mvert = mvert, .mloop = mloop, .looptri = looptri, - .tree = &treeData, .obstacle_map = obstacle_map, - .has_velocity = has_velocity, .vert_vel = vert_vel, + .tree = &treeData, .has_velocity = has_velocity, .vert_vel = vert_vel, .velocityX = velocityX, .velocityY = velocityY, .velocityZ = velocityZ, - .num_obstacles = num_obstacles + .num_objects = num_objects, .distances_map = distances_map, .surface_thickness = scs->surface_distance }; - BLI_task_parallel_range( - sds->res_min[2], sds->res_max[2], &data, obstacles_from_derivedmesh_task_cb, true); + ParallelRangeSettings settings; + BLI_parallel_range_settings_defaults(&settings); + settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC; + BLI_task_parallel_range(sds->res_min[2], sds->res_max[2], + &data, + obstacles_from_derivedmesh_task_cb, + &settings); } /* free bvh tree */ free_bvhtree_from_mesh(&treeData); @@@ -2816,11 -2461,13 +2844,14 @@@ typedef struct UpdateEffectorsData float *velocity_x; float *velocity_y; float *velocity_z; - unsigned char *obstacle; + int *flags; + float *phiObsIn; } UpdateEffectorsData; - static void update_effectors_task_cb(void *userdata, const int x) + static void update_effectors_task_cb( + void *__restrict userdata, + const int x, + const ParallelRangeTLS *__restrict UNUSED(tls)) { UpdateEffectorsData *data = userdata; SmokeDomainSettings *sds = data->sds; @@@ -2895,10 -2539,15 +2926,16 @@@ static void update_effectors(Scene *sce data.velocity_x = smoke_get_velocity_x(sds->fluid); data.velocity_y = smoke_get_velocity_y(sds->fluid); data.velocity_z = smoke_get_velocity_z(sds->fluid); - data.obstacle = smoke_get_obstacle(sds->fluid); + data.flags = smoke_get_obstacle(sds->fluid); + data.phiObsIn = liquid_get_phiobsin(sds->fluid); - BLI_task_parallel_range(0, sds->res[0], &data, update_effectors_task_cb, true); + ParallelRangeSettings settings; + BLI_parallel_range_settings_defaults(&settings); + settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC; + BLI_task_parallel_range(0, sds->res[0], + &data, + update_effectors_task_cb, + &settings); } pdEndEffectors(&effectors); diff --cc source/blender/editors/space_view3d/drawvolume.c index bed1f9cf8cf,cf118404183..8f1757d5d9e --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@@ -41,12 -41,10 +41,12 @@@ #include "BLI_math.h" #include "BKE_DerivedMesh.h" - #include "BKE_texture.h" + #include "BKE_colorband.h" #include "BKE_particle.h" -#include "smoke_API.h" +#ifdef WITH_MANTA +# include "manta_fluid_API.h" +#endif #include "BIF_gl.h" diff --cc source/blender/makesdna/DNA_smoke_types.h index e313491d22b,9932e16e988..d64d92cf37f --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@@ -212,15 -184,12 +212,15 @@@ typedef struct SmokeDomainSettings int cache_high_comp; /* OpenVDB cache options */ int openvdb_comp; - char cache_file_format; + char cache_surface_format; + char cache_volume_format; char data_depth; - char pad[2]; + char pad[1]; /* unused */ + /* Liquid cache options */ + int liquid_cache_comp; /* Smoke uses only one cache from now on (index [0]), but keeping the array for now for reading old files. */ - struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */ + struct PointCache *point_cache[2]; /* definition is in DNA_object_force_types.h */ struct ListBase ptcaches[2]; struct EffectorWeights *effector_weights; int border_collisions; /* How domain border collisions are handled */ diff --cc source/blender/makesrna/intern/rna_smoke.c index 4837ebbca49,1db64100d94..297f9cc202c --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@@ -40,10 -40,9 +40,10 @@@ #include "BKE_modifier.h" #include "BKE_smoke.h" #include "BKE_pointcache.h" +#include "BKE_object.h" #include "DNA_modifier_types.h" - #include "DNA_object_force.h" + #include "DNA_object_force_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_smoke_types.h" @@@ -56,11 -56,9 +57,10 @@@ #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_particle.h" - #include "BKE_texture.h" -#include "smoke_API.h" - +#ifdef WITH_MANTA +# include "manta_fluid_API.h" +#endif static void rna_Smoke_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { diff --cc source/blender/modifiers/intern/MOD_smoke.c index 31de6029106,2073e23b7b2..f4823717754 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@@ -127,13 -127,10 +127,10 @@@ static bool is_flow_cb(Object *UNUSED(o static bool is_coll_cb(Object *UNUSED(ob), ModifierData *md) { SmokeModifierData *smd = (SmokeModifierData *) md; - return (smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll; + return (smd->type & MOD_SMOKE_TYPE_EFFEC) && smd->effec; } - static void updateDepgraph(ModifierData *md, DagForest *forest, - struct Main *UNUSED(bmain), - struct Scene *scene, struct Object *ob, - DagNode *obNode) + static void updateDepgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) { SmokeModifierData *smd = (SmokeModifierData *) md; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs