Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-18 13:58:48 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-18 13:58:48 +0300
commitfc5eab357009f10fe68bb19a5d48f3ff7ab8825a (patch)
treeeab7eebf6d3a24731f51ba21fb51c91d308fc456 /source/blender/blenkernel/intern/DerivedMesh.c
parente371378c8b52273eab4c834b544c6c9af4f71f02 (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/blenkernel/intern/DerivedMesh.c')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 0dc85dfaa18..248e7958723 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1991,7 +1991,7 @@ Mesh *mesh_get_eval_deform(struct Depsgraph *depsgraph,
return ob->runtime.mesh_deform_eval;
}
-Mesh *mesh_create_eval_final_render(Depsgraph *depsgraph,
+Mesh *mesh_create_eval_final(Depsgraph *depsgraph,
Scene *scene,
Object *ob,
const CustomData_MeshMasks *dataMask)
@@ -2016,26 +2016,6 @@ Mesh *mesh_create_eval_final_index_render(Depsgraph *depsgraph,
return final;
}
-Mesh *mesh_create_eval_final_view(Depsgraph *depsgraph,
- Scene *scene,
- Object *ob,
- const CustomData_MeshMasks *dataMask)
-{
- Mesh *final;
-
- /* XXX hack
- * psys modifier updates particle state when called during dupli-list generation,
- * which can lead to wrong transforms. This disables particle system modifier execution.
- */
- ob->transflag |= OB_NO_PSYS_UPDATE;
-
- mesh_calc_modifiers(depsgraph, scene, ob, 1, false, dataMask, -1, false, false, NULL, &final);
-
- ob->transflag &= ~OB_NO_PSYS_UPDATE;
-
- return final;
-}
-
Mesh *mesh_create_eval_no_deform(Depsgraph *depsgraph,
Scene *scene,
Object *ob,