From 5347c7b9db2bdb4ca4ce6bd58bb9b7e03a6402df Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Wed, 23 Apr 2014 15:35:55 +0900 Subject: Added support for the Make Local command in the Outliner on textures in line styles. --- source/blender/blenkernel/intern/texture.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source/blender/blenkernel/intern/texture.c') diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 3e95da622ac..4fff50153ef 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; + } } } -- cgit v1.2.3