Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2006-12-29 07:46:47 +0300
committerMatt Ebb <matt@mke3.net>2006-12-29 07:46:47 +0300
commit376ee50d3e94c01707ae433e3642ec685e3b25cd (patch)
tree5c833717be4ef9f7d140d6ac99ddc9171b491fa1 /source/blender/src/usiblender.c
parent37c42e2949fc3ed9bdc0e25ab2a79fe8cd573842 (diff)
* Dynamic icon file loading and themeability
This patch allows icon files (.png) to be loaded into Blender dynamically, without having to go through the tedious and technical process of compiling them in. It also makes them part of the theme settings so they can be attached as part of a theme and saved in the default .B.blend. Icon files should be stored in $HOME/.blender/icons/ . This really sucks on Mac since it's hidden in the finder, but it's a separate issue. We need a better system of finding things like this, python scripts etc, perhaps a nice wrapped function something like BLI_getresourcedir(), then it's easy to do platform specific stuff there, like using ~/Library/Application Data on Mac. More info and docs in the patch tracker @ https://projects.blender.org/tracker/index.php?func=detail&aid=5334&group_id=9&atid=127
Diffstat (limited to 'source/blender/src/usiblender.c')
-rw-r--r--source/blender/src/usiblender.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index e6ee2a59f4a..31d3fedd14f 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -320,6 +320,9 @@ static void init_userdef_file(void)
SETCOL(btheme->tseq.transition, 162, 95, 111, 255);
SETCOL(btheme->tseq.meta, 109, 145, 131, 255);
}
+ if(!(btheme->tui.iconfile)) {
+ BLI_strncpy(btheme->tui.iconfile, "", sizeof(btheme->tui.iconfile));
+ }
}
/* set defaults for 3D View rotating axis indicator */
@@ -815,8 +818,6 @@ static void initbuttons(void)
BMF_GetFont(BMF_kHelvetica12),
BMF_GetFont(BMF_kHelvetica10),
BMF_GetFont(BMF_kHelveticaBold8));
-
- BIF_resources_init();
glClearColor(.7f, .7f, .6f, 0.0);
@@ -849,11 +850,12 @@ void BIF_init(void)
BIF_preview_init_dbase();
BIF_read_homefile();
+
+ BIF_resources_init(); /* after homefile, to dynamically load an icon file based on theme settings */
init_gl_stuff(); /* drawview.c, after homefile */
readBlog();
strcpy(G.lib, G.sce);
-
}
/***/