[Bf-blender-cvs] [5347c7b] master: Added support for the Make Local command in the Outliner on textures in line styles.

Tamito Kajiyama noreply at git.blender.org
Sat May 3 13:39:37 CEST 2014


Commit: 5347c7b9db2bdb4ca4ce6bd58bb9b7e03a6402df
Author: Tamito Kajiyama
Date:   Wed Apr 23 15:35:55 2014 +0900
https://developer.blender.org/rB5347c7b9db2bdb4ca4ce6bd58bb9b7e03a6402df

Added support for the Make Local command in the Outliner on textures in line styles.

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

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

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

diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 3e95da6..4fff501 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -788,6 +788,7 @@ void BKE_texture_make_local(Tex *tex)
 	Lamp *la;
 	Brush *br;
 	ParticleSettings *pa;
+	FreestyleLineStyle *ls;
 	int a;
 	bool is_local = false, is_lib = false;
 
@@ -856,6 +857,16 @@ void BKE_texture_make_local(Tex *tex)
 		}
 		pa = pa->id.next;
 	}
+	ls = bmain->linestyle.first;
+	while (ls) {
+		for (a = 0; a < MAX_MTEX; a++) {
+			if (ls->mtex[a] && ls->mtex[a]->tex == tex) {
+				if (ls->id.lib) is_lib = true;
+				else is_local = true;
+			}
+		}
+		ls = ls->id.next;
+	}
 	
 	if (is_local && is_lib == false) {
 		id_clear_lib_data(bmain, &tex->id);
@@ -939,6 +950,19 @@ void BKE_texture_make_local(Tex *tex)
 			}
 			pa = pa->id.next;
 		}
+		ls = bmain->linestyle.first;
+		while (ls) {
+			for (a = 0; a < MAX_MTEX; a++) {
+				if (ls->mtex[a] && ls->mtex[a]->tex == tex) {
+					if (ls->id.lib == NULL) {
+						ls->mtex[a]->tex = tex_new;
+						tex_new->id.us++;
+						tex->id.us--;
+					}
+				}
+			}
+			ls = ls->id.next;
+		}
 	}
 }




More information about the Bf-blender-cvs mailing list