diff options
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 11 | ||||
-rw-r--r-- | source/creator/creator.c | 49 |
2 files changed, 43 insertions, 17 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index eed690ae99a..0e0830f0fa2 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -68,6 +68,11 @@ if(WITH_IMAGE_HDR) add_definitions(-DWITH_HDR) endif() +if(WITH_LIBMV) + blender_include_dirs(../../extern/libmv) + add_definitions(-DWITH_LIBMV) +endif() + if(WITH_PYTHON) blender_include_dirs(../blender/python) add_definitions(-DWITH_PYTHON) @@ -779,6 +784,7 @@ endif() bf_editor_space_time bf_editor_space_userpref bf_editor_space_view3d + bf_editor_space_clip bf_editor_text bf_editor_transform @@ -836,6 +842,7 @@ endif() extern_minilzo extern_lzma extern_colamd + extern_libmv ge_logic_ketsji extern_recastnavigation ge_phys_common @@ -868,6 +875,10 @@ endif() cycles_subd ) + if(WITH_LIBMV) + list(APPEND BLENDER_SORTED_LIBS extern_libmv) + endif() + if(WITH_MOD_CLOTH_ELTOPO) list(APPEND BLENDER_SORTED_LIBS extern_eltopo) endif() 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?) */ |