[Bf-blender-cvs] [c3996b7] master: Revert 'use new BKE_id_expand_local()' change for Lamp's copy function.

Bastien Montagne noreply at git.blender.org
Mon Jul 11 22:35:17 CEST 2016


Commit: c3996b792a75b867491c345661c8a5271101866c
Author: Bastien Montagne
Date:   Mon Jul 11 20:16:22 2016 +0200
Branches: master
https://developer.blender.org/rBc3996b792a75b867491c345661c8a5271101866c

Revert 'use new BKE_id_expand_local()' change for Lamp's copy function.

ntree is once more time a PITA - actually, all sub-IDs that get copied together with the 'main' one are
(shapekey was workedaround, as was animdata/action issue, but nodes are more touchy).

For now, better not to touch that, needs careful check & rethink.

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

M	source/blender/blenkernel/intern/lamp.c

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

diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index e1aec61..a26ada8 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -127,6 +127,7 @@ Lamp *BKE_lamp_copy(Main *bmain, Lamp *la)
 		if (lan->mtex[a]) {
 			lan->mtex[a] = MEM_mallocN(sizeof(MTex), "copylamptex");
 			memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex));
+			id_us_plus((ID *)lan->mtex[a]->tex);
 		}
 	}
 	
@@ -137,8 +138,6 @@ Lamp *BKE_lamp_copy(Main *bmain, Lamp *la)
 	
 	lan->preview = BKE_previewimg_copy(la->preview);
 
-	BKE_id_expand_local(&lan->id, true);
-
 	if (ID_IS_LINKED_DATABLOCK(la)) {
 		BKE_id_lib_local_paths(bmain, la->id.lib, &lan->id);
 	}




More information about the Bf-blender-cvs mailing list