diff options
author | Ton Roosendaal <ton@blender.org> | 2005-12-12 19:29:47 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-12-12 19:29:47 +0300 |
commit | 46c18b3e954deeada4162b14b647d9db19e80222 (patch) | |
tree | 25030922408112ad2e8c9261557e2ff538ab7f0c | |
parent | d2a3d5e79c42bd68ec887e557a04d5a4d7114508 (diff) |
NLA editor, adding actions wasn't possible when amount of actions was over
30, the databrowse option didnt work.
Made popup menu to go to 60 now, in 3 collums max. Databrowse works too
now.
Next commit; check all other databrowsers for it.
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 20 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 11 | ||||
-rw-r--r-- | source/blender/src/filesel.c | 4 |
3 files changed, 19 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 28808bb900f..2dad108e320 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1,11 +1,6 @@ - -/* library.c - * - * Contains management of ID's and libraries - * allocate and free of all library data - * +/** * $Id$ - * + * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -34,6 +29,14 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ + +/* + * Contains management of ID's and libraries + * allocate and free of all library data + * + */ + + #include <stdio.h> #include <ctype.h> #include <string.h> @@ -101,7 +104,7 @@ #include "BKE_action.h" #include "BPI_script.h" -#define MAX_IDPUP 30 /* was 24 */ +#define MAX_IDPUP 60 /* was 24 */ #define MAX_LIBARRAY 100 /* was 30, warning: used it readfile.c too */ /* ************* general ************************ */ @@ -551,6 +554,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor if (nr && nids>MAX_IDPUP) { BLI_dynstr_append(pupds, "DataBrowse %x-2"); + *nr= -2; } else { ID *id; diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 45a80874596..19ab993a0f0 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -441,8 +441,8 @@ static void add_nlablock(void) { Object *ob= OBACT; short event; - short nr; - char *str, title[64]; + short nr=0; + char *str; if(ob==NULL) { error("Need active Object to add NLA strips"); @@ -450,10 +450,9 @@ static void add_nlablock(void) } /* Popup action menu */ - sprintf(title, "Add Action strip to %s", ob->id.name+2); - IDnames_to_pupstring(&str, title, NULL, &G.main->action, (ID *)G.scene, &nr); + IDnames_to_pupstring(&str, "Add Action strip", NULL, &G.main->action, (ID *)G.scene, &nr); - if(strncmp(str+13, "DataBrow", 8)==0) { + if(nr==-2) { MEM_freeN(str); activate_databrowse((ID *)NULL, ID_AC, 0, 0, &G.snla->menunr, @@ -462,7 +461,7 @@ static void add_nlablock(void) return; } else { - event = pupmenu(str); + event = pupmenu_col(str, 20); MEM_freeN(str); add_nla_block(event); } diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 269e4bc04d7..6ce6597d8b4 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1405,9 +1405,9 @@ void activate_databrowse(ID *id, int idcode, int fromcode, int retval, short *me SpaceFile *sfile; char str[32]; - if(id==0) { + if(id==NULL) { lb= wich_libbase(G.main, idcode); - id= lb->last; + id= lb->first; } if(id) strcpy(str, id->name); |