diff options
author | Ton Roosendaal <ton@blender.org> | 2006-11-16 13:36:45 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-11-16 13:36:45 +0300 |
commit | c1e4099365f5fa4a60ca9566746255569f688119 (patch) | |
tree | d75d807d202d34da1c4eaf1c70ada92b0a77828e | |
parent | 24b2e0422e68effb50546c7cdfd6112537612345 (diff) |
Plumiferos request; additional option for subsurf hotkey.
Now alt+shift+o only toggles the 3d view subsurf flag, rendering remains
subsurfed.
-rw-r--r-- | source/blender/src/editobject.c | 18 | ||||
-rw-r--r-- | source/blender/src/space.c | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 36dc8883b45..4195efc000c 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -2713,7 +2713,7 @@ void convertmenu(void) * level==-1 then toggle subsurf, else set to level. * *set allows to toggle multiple selections */ -static void object_flip_subdivison(Object *ob, int *set, int level) +static void object_flip_subdivison(Object *ob, int *set, int level, int mode) { ModifierData *md; @@ -2727,12 +2727,12 @@ static void object_flip_subdivison(Object *ob, int *set, int level) if (level == -1) { if(*set == -1) - *set= smd->modifier.mode&(eModifierMode_Render|eModifierMode_Realtime); + *set= smd->modifier.mode&(mode); if (*set) { - smd->modifier.mode &= ~(eModifierMode_Render|eModifierMode_Realtime); + smd->modifier.mode &= ~(mode); } else { - smd->modifier.mode |= (eModifierMode_Render|eModifierMode_Realtime); + smd->modifier.mode |= (mode); } } else { smd->levels = level; @@ -2761,14 +2761,20 @@ void flip_subdivison(int level) { Base *base; int set= -1; + int mode; + + if(G.qual & LR_ALTKEY) + mode= eModifierMode_Realtime; + else + mode= eModifierMode_Render|eModifierMode_Realtime; for(base= G.scene->base.first; base; base= base->next) { if(TESTBASE(base)) { - object_flip_subdivison(base->object, &set, level); + object_flip_subdivison(base->object, &set, level, mode); if(base->object->dup_group) { GroupObject *go; for(go= base->object->dup_group->gobject.first; go; go= go->next) - object_flip_subdivison(go->ob, &set, level); + object_flip_subdivison(go->ob, &set, level, mode); } } } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index ad42225f40b..4df663449f7 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1727,7 +1727,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) allqueue(REDRAWHEADERS, 0); } } - else if((G.qual==LR_SHIFTKEY)) { + else if((G.qual==LR_SHIFTKEY || G.qual==(LR_ALTKEY|LR_SHIFTKEY))) { flip_subdivison(-1); } else if(G.qual==LR_ALTKEY) { |