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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-08-17 11:35:57 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-08-17 11:50:45 +0400
commite85bcfab044f0bee9819608bab8ca95f09809ff6 (patch)
treefb595e5903b6499eeb8e4db1edcb5a6edb5b60fc /source/blender/blenkernel/intern/modifier.c
parented26d9dd90cd67c0ee4d88e1b4da9f2e6ac963d0 (diff)
Fix T41467: Modifier view buttons changing positions.
Commits early in this year (to save some space) broke this. Hopefully this time it works in all cases - lastCageIndex is no more influenced by realtime/edit active states. Also, inactivate buttons instead of hiding them, can be useful to set those data even though it does not have any immediate effect. Took the opportunity to switch cage buttons to RNA, btw.
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r--source/blender/blenkernel/intern/modifier.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 074a91ea2cf..b4d9561ec5d 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -353,6 +353,7 @@ int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *r_lastPossibleC
/* Find the last modifier acting on the cage. */
for (i = 0; md; i++, md = md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+ bool supports_mapping;
md->scene = scene;
@@ -360,16 +361,17 @@ int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *r_lastPossibleC
if (!(mti->flags & eModifierTypeFlag_SupportsEditmode)) continue;
if (md->mode & eModifierMode_DisableTemporary) continue;
+ supports_mapping = modifier_supportsMapping(md);
+ if (r_lastPossibleCageIndex && supports_mapping) {
+ *r_lastPossibleCageIndex = i;
+ }
+
if (!(md->mode & eModifierMode_Realtime)) continue;
if (!(md->mode & eModifierMode_Editmode)) continue;
- if (!modifier_supportsMapping(md))
+ if (!supports_mapping)
break;
- if (r_lastPossibleCageIndex) {
- *r_lastPossibleCageIndex = i;
- }
-
if (md->mode & eModifierMode_OnCage)
cageIndex = i;
}