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_weightvgedit.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c9
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)