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/include
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/include')
-rw-r--r--source/blender/include/BIF_interface_icons.h11
-rw-r--r--source/blender/include/BIF_resources.h1
-rw-r--r--source/blender/include/BIF_space.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/include/BIF_interface_icons.h b/source/blender/include/BIF_interface_icons.h
index 45f00dfb591..c69fa122099 100644
--- a/source/blender/include/BIF_interface_icons.h
+++ b/source/blender/include/BIF_interface_icons.h
@@ -40,6 +40,13 @@ struct Tex;
struct Lamp;
struct Material;
+typedef struct IconFile {
+ struct IconFile *next, *prev;
+ char filename[80]; // FILE_MAXFILE size
+ int index;
+} IconFile;
+
+
#define ICON_DEFAULT_HEIGHT 16
/*
@@ -55,4 +62,8 @@ void BIF_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, i
void BIF_icons_free();
void BIF_icons_free_drawinfo(void *drawinfo);
+struct ListBase *BIF_iconfile_list(void);
+int BIF_iconfile_get_index(char *filename);
+
+
#endif /* BIF_ICONS_H */
diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h
index ed458fb3695..7a8dc73632a 100644
--- a/source/blender/include/BIF_resources.h
+++ b/source/blender/include/BIF_resources.h
@@ -460,6 +460,7 @@ enum {
TH_CUSTOM,
TH_BUT_TEXTFIELD_HI,
+ TH_ICONFILE,
TH_THEMEUI,
// common colors among spaces
diff --git a/source/blender/include/BIF_space.h b/source/blender/include/BIF_space.h
index 1e84dba39cb..884f0459abf 100644
--- a/source/blender/include/BIF_space.h
+++ b/source/blender/include/BIF_space.h
@@ -84,6 +84,7 @@ struct SpaceOops;
#define B_CHANGE_THEME 3306
#define B_THEME_COPY 3307
#define B_THEME_PASTE 3308
+#define B_UPDATE_THEME_ICONS 3309
#define B_RECALCLIGHT 3310