diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-18 13:58:48 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-18 13:58:48 +0300 |
commit | fc5eab357009f10fe68bb19a5d48f3ff7ab8825a (patch) | |
tree | eab7eebf6d3a24731f51ba21fb51c91d308fc456 /source/blender/python | |
parent | e371378c8b52273eab4c834b544c6c9af4f71f02 (diff) |
Mesh: merge `mesh_create_eval_final_{view,render}` functions
Functions `mesh_create_eval_final_view()` and
`mesh_create_eval_final_render()` were doing the exact same thing,
except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for
T32846: dupligroup messes up particle instancing on rendering) that
appears to be no longer necessary. Besides that, these functions had
confusing names. Their functionality changed over time, and whether to
do for-render or for-viewport evaluation is now actually determined by
the depsgraph evaluation mode. This means that the `..._render` function
could evaluate a mesh with viewport settings, and vice versa.
The functions are now merged into `mesh_create_eval_final()`, and the
hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed
entirely (instead of keeping it around as deprecated flag), because it
was always only temporarily set on objects during mesh evaluation and
thus not saved to the blend file.
No expected functional changes as far as users are concerned.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 2 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_bvhtree.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index e39b5faf3c4..04bceb17c20 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1134,7 +1134,7 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject return NULL; } - me_eval = mesh_create_eval_final_render(depsgraph, scene_eval, ob_eval, &data_masks); + me_eval = mesh_create_eval_final(depsgraph, scene_eval, ob_eval, &data_masks); } else { if (use_cage) { diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c index 9d76f07e4fb..16ea05771d0 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.c +++ b/source/blender/python/mathutils/mathutils_bvhtree.c @@ -1053,7 +1053,7 @@ static Mesh *bvh_get_mesh(const char *funcname, } *r_free_mesh = true; - return mesh_create_eval_final_render(depsgraph, scene, ob, &data_masks); + return mesh_create_eval_final(depsgraph, scene, ob, &data_masks); } if (ob_eval != NULL) { if (use_cage) { |