From c2aec192dc2c104fe6a3215af9b78d169ff206fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Apr 2007 15:42:51 +0000 Subject: 2 minor changes, when an object is active, dont draw its text highlighted. (previously the active object was always drawn teh same weather selected or not, making it hard to use the outliner to modify the selection) Show an error if the user types in a library path that dosnt exist. (loading with a missing library path and saving can loose all your objects so a warning is best) --- source/blender/src/outliner.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/blender/src/outliner.c') diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index 10745eb6e9c..d0d3336dc45 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -2951,7 +2951,8 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st active= 2; if(ob==OBACT) { BIF_GetThemeColorType4ubv(TH_ACTIVE, SPACE_VIEW3D, col); - active= 1; + /* so black text is drawn when active and not selected */ + if (ob->flag & SELECT) active= 1; } else BIF_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col); col[3]= 100; @@ -3329,9 +3330,19 @@ static void namebutton_cb(void *tep, void *oldnamep) if(ts && te) { TreeStoreElem *tselem= TREESTORE(te); - + if(tselem->type==0) { test_idbutton(tselem->id->name+2); // library.c, unique name and alpha sort + + /* Check the library target exists */ + if (te->idcode == ID_LI) { + char expanded[FILE_MAXDIR + FILE_MAXFILE]; + BLI_strncpy(expanded, ((Library *)tselem->id)->name, FILE_MAXDIR + FILE_MAXFILE); + + if (!BLI_exists(expanded)) { + error("This path does not exist, correct this before saving"); + } + } } else { switch(tselem->type) { -- cgit v1.2.3