diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-20 16:56:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-20 16:57:31 +0300 |
commit | 08efcefb470577cafd2587c1b356b028365dd3f9 (patch) | |
tree | 34efcaaa0428c3de982a79a2c96c2fbe21e30c26 /source/blender/makesdna | |
parent | 1f97f6c531e5b47127d65d4e05d084bb01914426 (diff) |
Fix T61759: Dynamic paint smudge crash
The issue was caused by mesh needed for dynamic paint brush being
stored in the modifier. That make it to be freed and set to NULL
when running copy-on-write.
Solved by moving the mesh to be stored in modifier's runtime data.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_dynamicpaint_types.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index 9f585ac21af..15b270538ef 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -91,6 +91,14 @@ enum { MOD_DPAINT_INITIAL_VERTEXCOLOR = 3, }; +/* Is stored in ModifierData.runtime. */ +# +# +typedef struct DynamicPaintRuntime { + struct Mesh *canvas_mesh; + struct Mesh *brush_mesh; +} DynamicPaintRuntime; + typedef struct DynamicPaintSurface { struct DynamicPaintSurface *next, *prev; @@ -169,7 +177,6 @@ enum { typedef struct DynamicPaintCanvasSettings { /** For fast RNA access. */ struct DynamicPaintModifierData *pmd; - struct Mesh *mesh; struct ListBase surfaces; short active_sur, flags; @@ -248,7 +255,6 @@ enum { typedef struct DynamicPaintBrushSettings { /** For fast RNA access. */ struct DynamicPaintModifierData *pmd; - struct Mesh *mesh; struct ParticleSystem *psys; int flags; |