diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 2204ab85a2e..1f6f4d85f43 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -120,6 +120,10 @@ #include "binreloc.h" #endif +#ifdef WITH_LIBMV +#include "libmv-capi.h" +#endif + // from buildinfo.c #ifdef BUILD_DATE extern char build_date[]; @@ -141,7 +145,9 @@ static int print_version(int argc, const char **argv, void *data); extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ -#define BLEND_VERSION_STRING_FMT "Blender %d.%02d (sub %d)\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION +#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 */ static void setCallbacks(void); @@ -350,6 +356,10 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data) printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type); #endif // WITH_BUILDINFO +#ifdef WITH_LIBMV + libmv_startDebugLogging(); +#endif + BLI_argsPrint(data); return 0; } @@ -850,22 +860,23 @@ static int set_skip_frame(int argc, const char **argv, void *data) /* macro for ugly context setup/reset */ #ifdef WITH_PYTHON -#define BPY_CTX_SETUP(_cmd) \ -{ \ - wmWindowManager *wm= CTX_wm_manager(C); \ - wmWindow *prevwin= CTX_wm_window(C); \ - Scene *prevscene= CTX_data_scene(C); \ - if(wm->windows.first) { \ - CTX_wm_window_set(C, wm->windows.first); \ - _cmd; \ - CTX_wm_window_set(C, prevwin); \ - } \ - else { \ - fprintf(stderr, "Python script \"%s\" running with missing context data.\n", argv[1]); \ - _cmd; \ - } \ - CTX_data_scene_set(C, prevscene); \ -} \ +#define BPY_CTX_SETUP(_cmd) \ +{ \ + wmWindowManager *wm= CTX_wm_manager(C); \ + wmWindow *prevwin= CTX_wm_window(C); \ + Scene *prevscene= CTX_data_scene(C); \ + if(wm->windows.first) { \ + CTX_wm_window_set(C, wm->windows.first); \ + _cmd; \ + CTX_wm_window_set(C, prevwin); \ + } \ + else { \ + fprintf(stderr, "Python script \"%s\" " \ + "running with missing context data.\n", argv[1]); \ + _cmd; \ + } \ + CTX_data_scene_set(C, prevscene); \ +} \ #endif /* WITH_PYTHON */ @@ -1129,6 +1140,10 @@ int main(int argc, const char **argv) br_init( NULL ); #endif +#ifdef WITH_LIBMV + libmv_initLogging(argv[0]); +#endif + setCallbacks(); #ifdef __APPLE__ /* patch to ignore argument finder gives us (pid?) */ |