diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-14 19:42:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-14 19:42:51 +0400 |
commit | c2aec192dc2c104fe6a3215af9b78d169ff206fb (patch) | |
tree | 75d6a66468e841f06474c6da6dff86d15b214831 /source/blender/src/outliner.c | |
parent | 0a0cf54a27dded2ec23a3ff7b1af9ff3426bfbcf (diff) |
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)
Diffstat (limited to 'source/blender/src/outliner.c')
-rw-r--r-- | source/blender/src/outliner.c | 15 |
1 files changed, 13 insertions, 2 deletions
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) { |