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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-17 01:39:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-17 01:39:45 +0400
commit38b6f8f167662db35e8b51e8d9b2ecb13800982a (patch)
tree6500a4395e401d9a2fd82f5bdfd37ceeaa7072e4 /source/blender/blenlib/intern/util.c
parenta565154a8749df90c18df251049b0f8e613c3825 (diff)
UI:
* For new buttons spaces, automatically set horizontal/vertical align depending on size, instead of free. * Cleaned up the UI panel API. There's now a new uiBeginPanel function which takes a panel type, and a uiEndPanel which takes the final size. uiNewPanel* functions will be phased out. * Animate the re-alignment when a panel size changes, e.g. when enabling dupliframes. * Load ui scripts from the release/ folder first if it is available. This makes it easier to edit ui scripts, since it will directly use the original files which avoids having to run the build system. * Improve editing of panel types while blender is open. That means fixing some issues with lacking updates, overlaps, strange ordering. It even does an animation now when the panel resizes.
Diffstat (limited to 'source/blender/blenlib/intern/util.c')
-rw-r--r--source/blender/blenlib/intern/util.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 88f5038e19f..3d55a048d5f 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -831,10 +831,10 @@ char *BLI_gethome(void) {
/* this function returns the path to a blender folder, if it exists,
* trying in this order:
*
- * $HOME/.blender/folder_name
- * path_to_executable/.blender/folder_name
* path_to_executable/release/folder_name (in svn)
* ./release/folder_name (in svn)
+ * $HOME/.blender/folder_name
+ * path_to_executable/.blender/folder_name
*
* returns NULL if none is found. */
@@ -848,12 +848,20 @@ char *BLI_gethome_folder(char *folder_name)
char *s;
int i;
+ /* try path_to_executable/release/folder_name (in svn) */
+ if (folder_name) {
+ BLI_snprintf(tmpdir, sizeof(tmpdir), "release/%s", folder_name);
+ BLI_make_file_string("/", fulldir, bprogdir, tmpdir);
+ if (BLI_exists(fulldir)) return fulldir;
+ else fulldir[0] = '\0';
+ }
+
+ /* try ./release/folder_name (in svn) */
if(folder_name) {
- if(fulldir[0] != '\0')
- return fulldir;
+ BLI_snprintf(fulldir, sizeof(fulldir), "./release/%s", folder_name);
+ if (BLI_exists(fulldir)) return fulldir;
+ else fulldir[0] = '\0';
}
- else if(homedir[0] != '\0')
- return homedir;
/* BLI_gethome() can return NULL if env vars are not set */
s = BLI_gethome();
@@ -913,21 +921,6 @@ char *BLI_gethome_folder(char *folder_name)
else return homedir;
}
- /* try path_to_executable/release/folder_name (in svn) */
- if (folder_name) {
- BLI_snprintf(tmpdir, sizeof(tmpdir), "release/%s", folder_name);
- BLI_make_file_string("/", fulldir, bprogdir, tmpdir);
- if (BLI_exists(fulldir)) return fulldir;
- else fulldir[0] = '\0';
- }
-
- /* try ./release/folder_name (in svn) */
- if(folder_name) {
- BLI_snprintf(fulldir, sizeof(fulldir), "./release/%s", folder_name);
- if (BLI_exists(fulldir)) return fulldir;
- else fulldir[0] = '\0';
- }
-
return NULL;
}