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>2011-10-21 21:37:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-21 21:37:38 +0400
commit00735ed9e49d2103e06b0e25513b5b880f0db226 (patch)
treec7138c391136a658698b3195635d6d2298ecb51f /source/creator
parent4d48dbe5fd553ab149abd1f062eec08ae813060a (diff)
Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 24f2d22a029..cdbc21337e6 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -62,6 +62,7 @@
#include "DNA_ID.h"
#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
@@ -141,10 +142,6 @@ static int print_version(int argc, const char **argv, void *data);
extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */
-char bprogname[FILE_MAX];
-char bprogdir[FILE_MAX];
-char btempdir[FILE_MAX];
-
#define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION
/* Initialize callbacks for the modules that need them */
@@ -1154,11 +1151,8 @@ int main(int argc, const char **argv)
fpsetmask(0);
#endif
- // copy path to executable in bprogname. playanim and creting runtimes
- // need this.
-
- BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
- BLI_split_dir_part(bprogname, bprogdir, sizeof(bprogdir));
+ // initialize path to executable
+ BLI_init_program_path(argv[0]);
BLI_threadapi_init();
@@ -1213,7 +1207,8 @@ int main(int argc, const char **argv)
WM_init(C, argc, argv);
/* this is properly initialized with user defs, but this is default */
- BLI_where_is_temp(btempdir, FILE_MAX, 1); /* call after loading the startup.blend so we can read U.tempdir */
+ /* call after loading the startup.blend so we can read U.tempdir */
+ BLI_init_temporary_dir(U.tempdir);
#ifdef WITH_SDL
BLI_setenv("SDL_VIDEODRIVER", "dummy");
@@ -1224,7 +1219,8 @@ int main(int argc, const char **argv)
WM_init(C, argc, argv);
- BLI_where_is_temp(btempdir, FILE_MAX, 0); /* call after loading the startup.blend so we can read U.tempdir */
+ /* don't use user preferences temp dir */
+ BLI_init_temporary_dir(NULL);
}
#ifdef WITH_PYTHON
/**