Commit: 258634b43c6dae7c76d415d3882840352589c4f8
Author: Bastien Montagne
Date:   Mon Jun 19 15:05:08 2017 +0200
Branches: id_copy_refactor
https://developer.blender.org/rB258634b43c6dae7c76d415d3882840352589c4f8

Fix (unreported) missing Image usercount increase when copying UVProject 
modifier.

===================================================================

M       source/blender/modifiers/intern/MOD_uvproject.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_uvproject.c 
b/source/blender/modifiers/intern/MOD_uvproject.c
index 78dc1ea8bcb..01468c1143a 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -45,6 +45,7 @@
 
 
 #include "BKE_camera.h"
+#include "BKE_library.h"
 #include "BKE_library_query.h"
 #include "BKE_mesh.h"
 #include "BKE_DerivedMesh.h"
@@ -70,9 +71,12 @@ static void copyData(ModifierData *md, ModifierData *target)
 {
 #if 0
        UVProjectModifierData *umd = (UVProjectModifierData *) md;
-       UVProjectModifierData *tumd = (UVProjectModifierData *) target;
 #endif
+       UVProjectModifierData *tumd = (UVProjectModifierData *) target;
+
        modifier_copyData_generic(md, target);
+
+       id_us_plus((ID *)tumd->image);
 }
 
 static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData 
*UNUSED(md))

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to