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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-04-23 10:35:55 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-03 15:38:44 +0400
commit5347c7b9db2bdb4ca4ce6bd58bb9b7e03a6402df (patch)
treea2e99ad6dbe8459235a268dd7927ffccf8eb5ac7 /source/blender/blenkernel/intern/texture.c
parent78fb7249c68d86ae68e3062739c0a450c7f6ed1f (diff)
Added support for the Make Local command in the Outliner on textures in line styles.
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c24
1 files changed, 24 insertions, 0 deletions
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;
+ }
}
}