Support more kinds of paths for path re-writing / traversing, patch from Alex Fraser...
[blender.git] / source / blender / editors / space_outliner / outliner_draw.c
index 357730aff39f3c306ebf7bf2d2c6e942281b7096..96b5548a8c52b109c8fd0fad48b19d1c44e52e66 100644 (file)
@@ -310,11 +310,15 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
                        }                                       
                        /* Check the library target exists */
                        if (te->idcode == ID_LI) {
                        }                                       
                        /* 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);
+                               Library *lib= (Library *)tselem->id;
+                               char expanded[FILE_MAX];
+
+                               BKE_library_filepath_set(lib, lib->name);
+
+                               BLI_strncpy(expanded, lib->name, sizeof(expanded));
                                BLI_path_abs(expanded, G.main->name);
                                if (!BLI_exists(expanded)) {
                                BLI_path_abs(expanded, G.main->name);
                                if (!BLI_exists(expanded)) {
-                                       BKE_report(CTX_wm_reports(C), RPT_ERROR, "This path does not exist, correct this before saving");
+                                       BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Library path '%s' does not exist, correct this before saving", expanded);
                                }
                        }
                }
                                }
                        }
                }
@@ -1008,6 +1012,10 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
                                                UI_icon_draw(x, y, ICON_MOD_SOLIDIFY); break;
                                        case eModifierType_Screw:
                                                UI_icon_draw(x, y, ICON_MOD_SCREW); break;
                                                UI_icon_draw(x, y, ICON_MOD_SOLIDIFY); break;
                                        case eModifierType_Screw:
                                                UI_icon_draw(x, y, ICON_MOD_SCREW); break;
+                                       case eModifierType_WeightVGEdit:
+                                       case eModifierType_WeightVGMix:
+                                       case eModifierType_WeightVGProximity:
+                                               UI_icon_draw(x, y, ICON_MOD_VERTEX_WEIGHT); break;
                                        default:
                                                UI_icon_draw(x, y, ICON_DOT); break;
                                }
                                        default:
                                                UI_icon_draw(x, y, ICON_DOT); break;
                                }
@@ -1244,7 +1252,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
                if ( (SEARCHING_OUTLINER(soops) || (soops->outlinevis==SO_DATABLOCKS && soops->search_string[0]!=0)) && 
                         (tselem->flag & TSE_SEARCHMATCH)) 
                {
                if ( (SEARCHING_OUTLINER(soops) || (soops->outlinevis==SO_DATABLOCKS && soops->search_string[0]!=0)) && 
                         (tselem->flag & TSE_SEARCHMATCH)) 
                {
-                       /* TODO - add search highlight colour to theme? */
+                       /* TODO - add search highlight color to theme? */
                        glColor4f(0.2f, 0.5f, 0.2f, 0.3f);
                        glRecti(startx, *starty+1, ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
                }
                        glColor4f(0.2f, 0.5f, 0.2f, 0.3f);
                        glRecti(startx, *starty+1, ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
                }