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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-07-30 12:55:41 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-07-30 12:57:33 +0300
commit5662a5969b6f21f52690ce926f6b905a2757577a (patch)
treefb208f94dd61ee8b7ab652f4c2369a7bcf4a6c08 /source/blender/editors/physics
parent651d8bfd98db11eb58018412cc030cfe2705c519 (diff)
Particle: Fix incorrect access to evaluated mesh
Mesh can not be requested from original object, and it can not be copied into evaluated modifier because there is no such a thing yet. It can not be done this way now, because getting evaluated object will force it to re-calculate, which kind of defeats idea of this code to preserve un-baked particles.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_object.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index b03ec56c7e4..fcee2cde5b1 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -1090,7 +1090,6 @@ static bool copy_particle_systems_to_object(const bContext *C,
ModifierData *md;
ParticleSystem *psys_start = NULL, *psys, *psys_from;
ParticleSystem **tmp_psys;
- Mesh *final_mesh;
CustomData_MeshMasks cdmask = {0};
int i, totpsys;
@@ -1132,9 +1131,6 @@ static bool copy_particle_systems_to_object(const bContext *C,
*/
psys_start = totpsys > 0 ? tmp_psys[0] : NULL;
- /* Get the evaluated mesh (psys and their modifiers have not been appended yet) */
- final_mesh = mesh_get_eval_final(depsgraph, scene, ob_to, &cdmask);
-
/* now append psys to the object and make modifiers */
for (i = 0, psys_from = PSYS_FROM_FIRST; i < totpsys;
++i, psys_from = PSYS_FROM_NEXT(psys_from)) {
@@ -1155,10 +1151,6 @@ static bool copy_particle_systems_to_object(const bContext *C,
modifier_unique_name(&ob_to->modifiers, (ModifierData *)psmd);
psmd->psys = psys;
- BKE_id_copy_ex(NULL, &final_mesh->id, (ID **)&psmd->mesh_final, LIB_ID_COPY_LOCALIZE);
-
- BKE_mesh_calc_normals(psmd->mesh_final);
- BKE_mesh_tessface_ensure(psmd->mesh_final);
if (psys_from->edit) {
copy_particle_edit(depsgraph, scene, ob_to, psys, psys_from);