diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-08 00:34:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-08 00:34:34 +0400 |
commit | 48f6c5b05feecb516a6bc4374fb75de709c626c4 (patch) | |
tree | ba0f29ed6c46bf3975ada89af2081fb0149e886d /source/blender | |
parent | 3527c100652f029db7a0e5af27a16456ff5ae1df (diff) |
was missing depgraph update for centering objects in editmode if they were unselected.
ctrl+num keys for switching subsurf didnt work in editmode if the object wasnt selected. changed this to only operate on the editmode object. also
disallow ctrl+num to change layers for values above 4.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/editobject.c | 27 | ||||
-rw-r--r-- | source/blender/src/space.c | 33 |
2 files changed, 45 insertions, 15 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index cdc38ab1d2c..4029e031b63 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -1887,6 +1887,7 @@ void docenter(int centermode) recalc_editnormals(); tot_change++; + DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); } } @@ -3133,9 +3134,15 @@ void flip_subdivison(int level) mode= eModifierMode_Render|eModifierMode_Realtime; if(level == -1) { - for(base= G.scene->base.first; base; base= base->next) - if(((level==-1) && (TESTBASE(base))) || (TESTBASELIB(base))) - object_has_subdivision_particles(base->object, &havesubdiv, &havepart, 0); + if (G.obedit) { + object_has_subdivision_particles(G.obedit, &havesubdiv, &havepart, 0); + } else { + for(base= G.scene->base.first; base; base= base->next) { + if(((level==-1) && (TESTBASE(base))) || (TESTBASELIB(base))) { + object_has_subdivision_particles(base->object, &havesubdiv, &havepart, 0); + } + } + } } else havesubdiv= 1; @@ -3149,10 +3156,16 @@ void flip_subdivison(int level) } else if(havepart) particles= 1; - - for(base= G.scene->base.first; base; base= base->next) - if(((level==-1) && (TESTBASE(base))) || (TESTBASELIB(base))) - object_flip_subdivison_particles(base->object, &set, level, mode, particles, 0); + + if (G.obedit) { + object_flip_subdivison_particles(G.obedit, &set, level, mode, particles, 0); + } else { + for(base= G.scene->base.first; base; base= base->next) { + if(((level==-1) && (TESTBASE(base))) || (TESTBASELIB(base))) { + object_flip_subdivison_particles(base->object, &set, level, mode, particles, 0); + } + } + } countall(); allqueue(REDRAWVIEW3D, 0); diff --git a/source/blender/src/space.c b/source/blender/src/space.c index e396e078739..63836101d49 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1745,25 +1745,42 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) if ( (G.obedit) && (G.obedit->type==OB_MESH) ) select_faces_by_numverts(5); } + + else if(G.qual==LR_CTRLKEY) {} else do_layer_buttons(4); break; case SIXKEY: - do_layer_buttons(5); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(5); + break; case SEVENKEY: - do_layer_buttons(6); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(6); + break; case EIGHTKEY: - do_layer_buttons(7); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(7); + break; case NINEKEY: - do_layer_buttons(8); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(8); + break; case ZEROKEY: - do_layer_buttons(9); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(9); + break; case MINUSKEY: - do_layer_buttons(10); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(10); + break; case EQUALKEY: - do_layer_buttons(11); break; + if(G.qual==LR_CTRLKEY) {} + else do_layer_buttons(11); + break; case ACCENTGRAVEKEY: - do_layer_buttons(-1); break; + do_layer_buttons(-1); + break; case SPACEKEY: if(G.qual == LR_CTRLKEY) { |