From c26a4be5c013650f339f446185339aa71f2b88c4 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 21 Aug 2013 21:35:45 +0000 Subject: Fix [#36530] Texture tab refreshing problem That was not really a bug (code working as expected), but the way tex context was handled was a bit raw, now it is much smarter: * Default fallback context (when current one is no more valid) will now choose "most specific" ones first (i.e. material/lamp/particules before world and "others"). * When using that default fallback context, previous one is stored and we try to revive it later, if possible. Thus e.g. object[mat tex ctxt] -> empty[default world ctxt] -> object[mat tex ctxt] is now working as expected. * However, when user explicitely or implicitely (through e.g. going to Material context...) sets a tex context, previous one is not stored, so that only default fallback context switch may later automatically revive a previous (presumably user-set) context. --- source/blender/makesdna/DNA_space_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 3e1196fb45a..5c308083f3c 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -132,8 +132,9 @@ typedef struct SpaceButs { short mainb, mainbo, mainbuser; /* context tabs */ short re_align, align; /* align for panels */ short preview; /* preview is signal to refresh */ - short texture_context; /* texture context selector (material, world, brush)*/ - char flag, pad; + /* texture context selector (material, lamp, particles, world, other)*/ + short texture_context, texture_context_prev; + char flag, pad[7]; void *path; /* runtime */ int pathflag, dataicon; /* runtime */ -- cgit v1.2.3