diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-10 22:12:07 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-06-10 22:12:07 +0400 |
commit | 67a5d1b660a37a43f4d70fc7d588b67bef434574 (patch) | |
tree | 509b19645a58de73e8ee9ae6c16342dfaa6155ba /source/blender/modifiers/intern/MOD_weightvgedit.c | |
parent | 5183ba74a84d1d41561f233bc1679d5a4fd422cb (diff) |
Follow up to r57354: WeightVG and Wave modifiers too need to handle tex id refcount ;)
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgedit.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgedit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index eee0856d69e..959e4d4f59d 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -43,6 +43,7 @@ #include "BKE_cdderivedmesh.h" #include "BKE_colortools.h" /* CurveMapping. */ #include "BKE_deform.h" +#include "BKE_library.h" #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_texture.h" /* Texture masking. */ @@ -77,6 +78,10 @@ static void freeData(ModifierData *md) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md; curvemapping_free(wmd->cmap_curve); + + if (wmd->mask_texture) { + id_us_min(&wmd->mask_texture->id); + } } static void copyData(ModifierData *md, ModifierData *target) @@ -102,6 +107,10 @@ static void copyData(ModifierData *md, ModifierData *target) twmd->mask_tex_mapping = wmd->mask_tex_mapping; twmd->mask_tex_map_obj = wmd->mask_tex_map_obj; BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name)); + + if (twmd->mask_texture) { + id_us_plus(&twmd->mask_texture->id); + } } static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) |