diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2010-07-20 06:18:10 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2010-07-20 06:18:10 +0400 |
commit | 80e63236464a7e864c45e163dd059ffe61735926 (patch) | |
tree | 4fb120608572fd4a3126838be24253e68bf1e693 /source/blender/blenloader/intern/readfile.c | |
parent | 1033b60824c291089e568e1b20b8b1a734cb28e1 (diff) |
* Images for brush icons are now reloaded when they are needed from an external file
* First, try to load the file from the given filename. This is either absolute or relative to the current .blend
* If file is found using the given filename directly then look for the file in the datafiles/brushicons directory (local, user, or system).
* Note: This commit does not update the .blend to reference the default icons
* Note: This commit does not make sure that the build system copies the default icons to the 2.52/datafiles/brushicons directory
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fce87302d30..675ccb152d2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1539,8 +1539,11 @@ static void lib_link_brush(FileData *fd, Main *main) brush->id.flag -= LIB_NEEDLINK; brush->mtex.tex= newlibadr_us(fd, brush->id.lib, brush->mtex.tex); - brush->image_icon= newlibadr_us(fd, brush->id.lib, brush->image_icon); brush->clone.image= newlibadr_us(fd, brush->id.lib, brush->clone.image); + + // Image icons not saved if only used as an icon, + // but if it used elsewhere in the file it will have been saved + brush->image_icon= newlibadr_us(fd, brush->id.lib, brush->image_icon); } } } @@ -10981,6 +10984,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for (brush= main->brush.first; brush; brush= brush->id.next) { /* Sanity Check */ + // brush icon loaded but not the path + //if (brush->image_icon && !(brush->image_icon_path[0])) + // BLI_strncpy(brush->image_icon_path, brush->image_icon->name, sizeof(brush->image_icon_path)); + // infinite number of dabs if (brush->spacing == 0) brush->spacing = 10; |