Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 28 Nov 2018 13:42:38 +0000 (14:42 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 28 Nov 2018 13:42:38 +0000 (14:42 +0100)
1  2 
build_files/cmake/macros.cmake
intern/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/creator/creator.c

index 948cedfc48e56b6072704f7e19eaa2d11a08a520,2e7ed80184621ea3cc8f737bee13070afaee24bf..e250eae19a4d3b1b21487efe644cbaca7c0e3569
@@@ -326,7 -326,7 +326,7 @@@ function(SETUP_LIBDIRS
                        link_directories(${JACK_LIBPATH})
                endif()
                if(WITH_CODEC_SNDFILE)
 -                      link_directories(${SNDFILE_LIBPATH})
 +                      link_directories(${LIBSNDFILE_LIBPATH})
                endif()
                if(WITH_FFTW3)
                        link_directories(${FFTW3_LIBPATH})
@@@ -417,7 -417,7 +417,7 @@@ function(setup_liblink
                target_link_libraries(${target} ${JACK_LIBRARIES})
        endif()
        if(WITH_CODEC_SNDFILE)
 -              target_link_libraries(${target} ${SNDFILE_LIBRARIES})
 +              target_link_libraries(${target} ${LIBSNDFILE_LIBRARIES})
        endif()
        if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
                target_link_libraries(${target} ${SDL_LIBRARY})
@@@ -565,12 -565,6 +565,12 @@@ function(SETUP_BLENDER_SORTED_LIBS
                endif()
        endif()
  
 +      if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
 +              list(APPEND BLENDER_LINK_LIBS
 +                      audaspace
 +                      audaspace-py)
 +      endif()
 +
        # Sort libraries
        set(BLENDER_SORTED_LIBS
                bf_windowmanager
                bf_editor_space_outliner
                bf_editor_space_script
                bf_editor_space_sequencer
 +              bf_editor_space_statusbar
                bf_editor_space_text
                bf_editor_space_time
 +              bf_editor_space_topbar
                bf_editor_space_userpref
                bf_editor_space_view3d
                bf_editor_space_clip
  
                bf_editor_transform
 -              bf_editor_util
                bf_editor_uvedit
                bf_editor_curve
 -              bf_editor_gpencil
                bf_editor_interface
 +              bf_editor_gizmo_library
                bf_editor_mesh
                bf_editor_metaball
                bf_editor_object
 +              bf_editor_gpencil
                bf_editor_lattice
                bf_editor_armature
                bf_editor_physics
                bf_editor_render
 +              bf_editor_scene
                bf_editor_screen
                bf_editor_sculpt_paint
                bf_editor_sound
                bf_editor_datafiles
                bf_editor_mask
                bf_editor_io
 +              bf_editor_util
  
                bf_render
                bf_python
                bf_python_ext
                bf_python_mathutils
 +              bf_python_gpu
                bf_python_bmesh
                bf_freestyle
                bf_ikplugin
                bf_modifiers
 +              bf_gpencil_modifiers
                bf_alembic
                bf_bmesh
                bf_gpu
 +              bf_draw
                bf_blenloader
                bf_blenkernel
 +              bf_shader_fx
 +              bf_gpencil_modifiers
                bf_physics
                bf_nodes
                bf_rna
 +              bf_editor_gizmo_library  # rna -> gizmo bad-level calls
 +              bf_python
                bf_imbuf
                bf_blenlib
                bf_depsgraph
                bf_intern_guardedalloc
                bf_intern_ctr
                bf_intern_utfconv
 -              ge_blen_routines
 -              ge_converter
 -              ge_phys_dummy
 -              ge_phys_bullet
                bf_intern_smoke
                extern_lzma
                extern_curve_fit_nd
 -              ge_logic_ketsji
 -              extern_recastnavigation
 -              ge_logic
 -              ge_rasterizer
 -              ge_oglrasterizer
 -              ge_logic_expressions
 -              ge_scenegraph
 -              ge_logic_network
 -              ge_logic_ngnetwork
 -              ge_logic_loopbacknetwork
                bf_intern_moto
                extern_openjpeg
 -              ge_videotex
                bf_dna
 +
                bf_blenfont
 +              bf_gpu  # duplicate for blenfont
                bf_blentranslation
                bf_intern_audaspace
 +              audaspace
 +              audaspace-py
                bf_intern_mikktspace
                bf_intern_dualcon
                bf_intern_cycles
                cycles_util
                cycles_subd
                bf_intern_opencolorio
 +              bf_intern_gawain
                bf_intern_eigen
                extern_rangetree
                extern_wcwidth
  
                bf_intern_glew_mx
                bf_intern_clog
 +              bf_intern_opensubdiv
+               bf_intern_numaapi
        )
  
        if(NOT WITH_SYSTEM_GLOG)
        endif()
  
        if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
 -              list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
 -      endif()
 -
 -      if(WITH_GAMEENGINE_DECKLINK)
 -              list(APPEND BLENDER_SORTED_LIBS bf_intern_decklink)
 +              list_insert_after(BLENDER_SORTED_LIBS "extern_openjpeg" "extern_bullet")
        endif()
  
        if(WIN32)
                list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
        endif()
  
 -      if(WITH_OPENSUBDIV)
 -              list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
 -      endif()
 -
        if(WITH_OPENVDB)
                list(APPEND BLENDER_SORTED_LIBS bf_intern_openvdb)
        endif()
@@@ -1387,7 -1388,6 +1388,7 @@@ function(find_python_packag
                  NAMES
                    ${package}
                  HINTS
 +                  "${PYTHON_LIBPATH}/"
                    "${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
                    "${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
                  PATH_SUFFIXES
diff --combined intern/CMakeLists.txt
index c7f0f414fb1f63fda51a621b64c9bf2ebd0a63ca,4110376652d1a25a9aca7aa5d07f5dbfb2f16cdf..16bbefc1c45cfdf878ec1455a2dd4f827cf86115
@@@ -30,12 -30,16 +30,13 @@@ add_subdirectory(ghost
  add_subdirectory(guardedalloc)
  add_subdirectory(libmv)
  add_subdirectory(memutil)
+ add_subdirectory(numaapi)
  add_subdirectory(opencolorio)
 +add_subdirectory(opensubdiv)
  add_subdirectory(mikktspace)
  add_subdirectory(glew-mx)
  add_subdirectory(eigen)
  
 -if(WITH_GAMEENGINE_DECKLINK)
 -      add_subdirectory(decklink)
 -endif()
 -
  if(WITH_AUDASPACE)
        add_subdirectory(audaspace)
  endif()
@@@ -60,6 -64,10 +61,6 @@@ if(WITH_IK_ITASC
        add_subdirectory(itasc)
  endif()
  
 -if(WITH_GAMEENGINE)
 -      add_subdirectory(moto)
 -endif()
 -
  if(WITH_CYCLES)
        add_subdirectory(cycles)
  endif()
@@@ -72,9 -80,15 +73,9 @@@ if(WITH_BULLET
        add_subdirectory(rigidbody)
  endif()
  
 -if(WITH_OPENSUBDIV)
 -      add_subdirectory(opensubdiv)
 -endif()
 -
  # only windows needs utf16 converter
 -# gpudirect is a runtime interface to the nVidia's DVP driver, only for windows
  if(WIN32)
        add_subdirectory(utfconv)
 -      add_subdirectory(gpudirect)
  endif()
  
  if(WITH_OPENVDB)
index 91887c1ef5ede43700a474f31fcfc6ae2853a64e,16dfec772606ec85dedcd03948eebbc9de0e0cf9..921ecc29e18b8dce60e29ffb43423266bbc70854
@@@ -30,6 -30,7 +30,7 @@@ set(IN
        ../../../intern/guardedalloc
        ../../../intern/atomic
        ../../../intern/eigen
+       ../../../intern/numaapi/include
        ../../../extern/wcwidth
  )
  
@@@ -47,15 -48,12 +48,15 @@@ set(SR
        intern/BLI_ghash.c
        intern/BLI_ghash_utils.c
        intern/BLI_heap.c
 +      intern/BLI_heap_simple.c
        intern/BLI_kdopbvh.c
        intern/BLI_kdtree.c
        intern/BLI_linklist.c
        intern/BLI_linklist_lockfree.c
        intern/BLI_memarena.c
 +      intern/BLI_memiter.c
        intern/BLI_mempool.c
 +      intern/BLI_timer.c
        intern/DLRB_tree.c
        intern/array_store.c
        intern/array_store_utils.c
        intern/easing.c
        intern/edgehash.c
        intern/endian_switch.c
 +      intern/expr_pylike_eval.c
        intern/fileops.c
        intern/fnmatch.c
        intern/freetypefont.c
 -      intern/graph.c
        intern/gsqueue.c
        intern/hash_md5.c
        intern/hash_mm2a.c
        BLI_edgehash.h
        BLI_endian_switch.h
        BLI_endian_switch_inline.h
 +      BLI_expr_pylike_eval.h
        BLI_fileops.h
        BLI_fileops_types.h
        BLI_fnmatch.h
        BLI_ghash.h
 -      BLI_graph.h
        BLI_gsqueue.h
        BLI_hash.h
        BLI_hash_md5.h
        BLI_hash_mm2a.h
        BLI_hash_mm3.h
        BLI_heap.h
 +      BLI_heap_simple.h
 +      BLI_iterator.h
        BLI_jitter_2d.h
        BLI_kdopbvh.h
        BLI_kdtree.h
        BLI_math_statistics.h
        BLI_math_vector.h
        BLI_memarena.h
 +      BLI_memiter.h
        BLI_memory_utils.h
        BLI_mempool.h
        BLI_noise.h
        BLI_task.h
        BLI_threads.h
        BLI_timecode.h
 +      BLI_timer.h
        BLI_utildefines.h
        BLI_utildefines_iter.h
        BLI_utildefines_stack.h
diff --combined source/creator/creator.c
index 5a61f077a84e0c27e87eb974ad569de08fac8dce,1d39fd6f05a9b43f756540f0c9d19c6b36da94f2..ce25a71c6d84f1036ce8854c3a98e58cf842dc98
@@@ -52,6 -52,7 +52,7 @@@
  #include "BLI_callbacks.h"
  #include "BLI_string.h"
  #include "BLI_system.h"
+ #include "BLI_threads.h"
  
  /* mostly init functions */
  #include "BKE_appdir.h"
  #include "BKE_brush.h"
  #include "BKE_cachefile.h"
  #include "BKE_context.h"
 -#include "BKE_depsgraph.h" /* for DAG_init */
  #include "BKE_font.h"
  #include "BKE_global.h"
  #include "BKE_material.h"
  #include "BKE_modifier.h"
 +#include "BKE_gpencil_modifier.h"
  #include "BKE_node.h"
 +#include "BKE_shader_fx.h"
  #include "BKE_sound.h"
  #include "BKE_image.h"
  #include "BKE_particle.h"
  
 +#include "DEG_depsgraph.h"
  
  #include "IMB_imbuf.h"  /* for IMB_init */
  
@@@ -80,7 -79,6 +81,7 @@@
  #include "ED_datafiles.h"
  
  #include "WM_api.h"
 +#include "WM_toolsystem.h"
  
  #include "RNA_define.h"
  
  #  include "FRS_freestyle.h"
  #endif
  
 -/* for passing information between creator and gameengine */
 -#ifdef WITH_GAMEENGINE
 -#  include "BL_System.h"
 -#else /* dummy */
 -#  define SYS_SystemHandle int
 -#endif
 -
  #include <signal.h>
  
  #ifdef __FreeBSD__
@@@ -222,6 -227,7 +223,6 @@@ int main
          )
  {
        bContext *C;
 -      SYS_SystemHandle syshandle;
  
  #ifndef WITH_PYTHON_MODULE
        bArgs *ba;
        struct CreatorAtExitData app_init_data = {NULL};
        BKE_blender_atexit_register(callback_main_atexit, &app_init_data);
  
 +      /* Unbuffered stdout makes stdout and stderr better synchronized, and helps
 +       * when stepping through code in a debugger (prints are immediately
 +       * visible). */
 +      setvbuf(stdout, NULL, _IONBF, 0);
 +
  #ifdef WIN32
        /* We delay loading of openmp so we can set the policy here. */
  # if defined(_MSC_VER)
        BKE_appdir_program_path_init(argv[0]);
  
        BLI_threadapi_init();
+       BLI_thread_put_process_on_fast_node();
  
        DNA_sdna_current_init();
  
        BKE_cachefiles_init();
        BKE_images_init();
        BKE_modifier_init();
 -      DAG_init();
 +      BKE_gpencil_modifier_init();
 +      BKE_shaderfx_init();
 +      DEG_register_node_types();
  
        BKE_brush_system_init();
        RE_texture_rng_init();
  
        BLI_callback_global_init();
  
 -#ifdef WITH_GAMEENGINE
 -      syshandle = SYS_GetSystem();
 -#else
 -      syshandle = 0;
 -#endif
 -
        /* first test for background */
  #ifndef WITH_PYTHON_MODULE
        ba = BLI_argsInit(argc, (const char **)argv); /* skip binary path */
        /* ensure we free on early exit */
        app_init_data.ba = ba;
  
 -      main_args_setup(C, ba, &syshandle);
 +      main_args_setup(C, ba);
  
        BLI_argsParse(ba, 1, NULL, NULL);
  
  
  #else
        G.factory_startup = true;  /* using preferences or user startup makes no sense for py-as-module */
 -      (void)syshandle;
  #endif
  
  #ifdef WITH_FFMPEG
  #endif
  
        CTX_py_init_set(C, 1);
 -      WM_keymap_init(C);
 +      WM_keyconfig_init(C);
  
  #ifdef WITH_FREESTYLE
        /* initialize Freestyle */
                WM_exit(C);
        }
        else {
 -              if (G.fileflags & G_FILE_AUTOPLAY) {
 -                      if (G.f & G_SCRIPT_AUTOEXEC) {
 -                              if (WM_init_game(C)) {
 -                                      return 0;
 -                              }
 -                      }
 -                      else {
 -                              if (!(G.f & G_SCRIPT_AUTOEXEC_FAIL_QUIET)) {
 -                                      G.f |= G_SCRIPT_AUTOEXEC_FAIL;
 -                                      BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Game AutoStart");
 -                              }
 -                      }
 -              }
 -
                if (!G.file_loaded) {
                        WM_init_splash(C);
                }