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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_particlesystem.c')
-rw-r--r--source/blender/modifiers/intern/MOD_particlesystem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c
index e49f16b994c..4c1179af431 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/source/blender/modifiers/intern/MOD_particlesystem.c
@@ -91,6 +91,11 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
BKE_modifier_copydata_generic(md, target, flag);
+ /* NOTE: `psys` pointer here is just copied over from `md` to `target`. This is dangerous, as it
+ * will generate invalid data in case we are copying between different objects. Extra external
+ * code has to be called then to ensure proper remapping of that pointer. See e.g.
+ * `BKE_object_copy_particlesystems` or `BKE_object_copy_modifier`. */
+
tpsmd->mesh_final = NULL;
tpsmd->mesh_original = NULL;
tpsmd->totdmvert = tpsmd->totdmedge = tpsmd->totdmface = 0;