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:
authorDaniel Dunbar <daniel@zuster.org>2005-07-15 21:55:19 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-15 21:55:19 +0400
commit0be013010fa5acc19c34a516e3f8e62f4f0c80d7 (patch)
tree549f693dd3ca03eaca75dfea749b2578b569de5b /source/blender/src/editlattice.c
parent5263d588c10a252a6bac9f14e521adef4c90cdab (diff)
- decided it made more sense to make a key_get_active function, switched
to that in editmesh as well as for edit{curve,lattice} - added a G.editModeTitleExtra string that gets displayed in header info string in editmode. currently used to display "(Key)" when editing a key (before there was not UI level display of this info).
Diffstat (limited to 'source/blender/src/editlattice.c')
-rw-r--r--source/blender/src/editlattice.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/source/blender/src/editlattice.c b/source/blender/src/editlattice.c
index 9566c0cb40a..10cdda7eeb7 100644
--- a/source/blender/src/editlattice.c
+++ b/source/blender/src/editlattice.c
@@ -108,22 +108,15 @@ static void setflagsLatt(int flag)
void make_editLatt(void)
{
Lattice *lt;
- KeyBlock *actkey=0;
+ KeyBlock *actkey;
free_editLatt();
lt= G.obedit->data;
- /* keys? */
- if(lt->key) {
- actkey= lt->key->block.first;
- while(actkey) {
- if(actkey->flag & SELECT) break;
- actkey= actkey->next;
- }
- }
-
+ actkey = key_get_active(lt->key);
if(actkey) {
+ strcpy(G.editModeTitleExtra, "(Key) ");
key_to_latt(actkey, lt);
}
@@ -138,22 +131,14 @@ void make_editLatt(void)
void load_editLatt(void)
{
Lattice *lt;
- KeyBlock *actkey=0;
+ KeyBlock *actkey;
BPoint *bp;
float *fp;
int tot;
lt= G.obedit->data;
- /* are there keys? */
- if(lt->key) {
- actkey= lt->key->block.first;
- while(actkey) {
- if(actkey->flag & SELECT) break;
- actkey= actkey->next;
- }
- }
-
+ actkey = key_get_active(lt->key);
if(actkey) {
/* active key: vertices */
tot= editLatt->pntsu*editLatt->pntsv*editLatt->pntsw;
@@ -170,7 +155,7 @@ void load_editLatt(void)
bp++;
}
- if(actkey) showkeypos(lt->key, actkey);
+ showkeypos(lt->key, actkey);
}
else {