diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-19 17:03:24 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-19 17:03:24 +0300 |
commit | 338abd6f68d8ba8fc7546d90eedf1eae1ed1a7c0 (patch) | |
tree | 7ebae3d97c691964acb0ff0bb395bb8ca2cff3d3 /intern | |
parent | 46c35dc2834db57ff6c64e251ec99a164ce19e51 (diff) | |
parent | 0c20fce2f2bf3ef8ebca8bc20d676a1d65d5203d (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 15 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 4b29c28913b..a461982a538 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -460,9 +460,12 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render, sync_objects(b_depsgraph, b_v3d, 0.0f); } - /* always sample these times for camera motion */ - motion_times.insert(-1.0f); - motion_times.insert(1.0f); + /* Insert motion times from camera. Motion times from other objects + * have already been added in a sync_objects call. */ + uint camera_motion_steps = object_motion_steps(b_cam, b_cam); + for (size_t step = 0; step < camera_motion_steps; step++) { + motion_times.insert(scene->camera->motion_time(step)); + } /* note iteration over motion_times set happens in sorted order */ foreach (float relative_time, motion_times) { @@ -487,10 +490,8 @@ void BlenderSync::sync_motion(BL::RenderSettings &b_render, b_engine.frame_set(frame, subframe); python_thread_state_save(python_thread_state); - /* sync camera, only supports two times at the moment */ - if (relative_time == -1.0f || relative_time == 1.0f) { - sync_camera_motion(b_render, b_cam, width, height, relative_time); - } + /* Syncs camera motion if relative_time is one of the camera's motion times. */ + sync_camera_motion(b_render, b_cam, width, height, relative_time); /* sync object */ sync_objects(b_depsgraph, b_v3d, relative_time); diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index b70c26b6043..8e635f7aa41 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -349,7 +349,10 @@ def liquid_step_mesh_$ID$():\n\ interpolateMACGrid(target=vel_sm$ID$, source=vel_s$ID$)\n\ mVel_mesh$ID$.setSource(vel_sm$ID$, isMAC=True)\n\ \n\ - phi_sm$ID$.setBound(0.5,int(((upres_sm$ID$)*2)-2) )\n\ + # Set 0.5 boundary at walls + account for extra wall thickness in fractions mode + account for grid scaling:\n\ + # E.g. at upres=1 we expect 1 cell border (or 2 with fractions), at upres=2 we expect 2 cell border (or 4 with fractions), etc.\n\ + # Use -1 since setBound() starts counting at 0 (and additional -1 for fractions to account for solid/fluid interface cells)\n\ + phi_sm$ID$.setBound(value=0.5, boundaryWidth=(upres_sm$ID$*2)-2 if using_fractions_s$ID$ else upres_sm$ID$-1)\n\ phi_sm$ID$.createMesh(mesh_sm$ID$)\n"; const std::string liquid_step_particles = |