Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jun 2017 23:57:40 +0000 (09:57 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 26 Jun 2017 23:59:36 +0000 (09:59 +1000)
CMakeLists.txt
GNUmakefile
build_files/build_environment/install_deps.sh
source/blender/blenkernel/BKE_library_query.h
source/blender/blenkernel/BKE_library_remap.h
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/windowmanager/intern/wm_files_link.c

index 3da27fb52d5bc64e1fb8344fef7d2237981243c4..3adf5825fa45a6c3f3daece11a89bcb02fb1750c 100644 (file)
@@ -58,7 +58,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/platform")
 
 # avoid having empty buildtype
-set(CMAKE_BUILD_TYPE_INIT "Release")
+if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
+       set(CMAKE_BUILD_TYPE_INIT "Release")
+endif()
 
 # quiet output for Makefiles, 'make -s' helps too
 # set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
index 7ee011911f82c96fc6b385341bf1c706ee5597de..dbba6ffab8e9cf21556921e8a291bda55188606e 100644 (file)
@@ -104,7 +104,7 @@ endif
 CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
                      -H"$(BLENDER_DIR)" \
                      -B"$(BUILD_DIR)" \
-                     -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
+                     -DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
 
 
 # -----------------------------------------------------------------------------
index cab67e68e0ee129ec3db1a5341e165a8c5a7b385..ad9ef3f8594ceb9d3f2ee173276698b429dd0936 100755 (executable)
@@ -26,7 +26,7 @@ ARGS=$( \
 getopt \
 -o s:i:t:h \
 --long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
-with-all,with-opencollada,\
+with-all,with-opencollada,with-jack,\
 ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
 force-all,force-python,force-numpy,force-boost,\
 force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
@@ -113,6 +113,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
     --with-opencollada
         Build and install the OpenCOLLADA libraries.
 
+    --with-jack
+        Install the jack libraries.
+
     --ver-ocio=<ver>
         Force version of OCIO library.
 
@@ -499,6 +502,9 @@ while true; do
     --with-opencollada)
       WITH_OPENCOLLADA=true; shift; continue
     ;;
+    --with-jack)
+      WITH_JACK=true; shift; continue;
+    ;;
     --ver-ocio)
       OCIO_VERSION="$2"
       OCIO_VERSION_MIN=$OCIO_VERSION
@@ -702,6 +708,9 @@ done
 if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then
   WITH_OPENCOLLADA=true
 fi
+if [ "$WITH_ALL" = true ]; then
+  WITH_JACK=true
+fi
 
 
 WARNING "****WARNING****"
@@ -2644,7 +2653,7 @@ install_DEB() {
     PRINT ""
   fi
 
-  if [ "$WITH_ALL" = true ]; then
+  if [ "$WITH_JACK" = true ]; then
     _packages="$_packages libspnav-dev"
     # Only install jack if jack2 is not already installed!
     JACK="libjack-dev"
@@ -3181,7 +3190,7 @@ install_RPM() {
   if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then
     _packages="$_packages freetype-devel tbb-devel"
 
-    if [ "$WITH_ALL" = true ]; then
+    if [ "$WITH_JACK" = true ]; then
       _packages="$_packages jack-audio-connection-kit-devel"
     fi
 
@@ -3655,7 +3664,11 @@ install_ARCH() {
   THEORA_USE=true
 
   if [ "$WITH_ALL" = true ]; then
-    _packages="$_packages jack libspnav"
+    _packages="$_packages libspnav"
+  fi
+
+  if [ "$WITH_JACK" = true ]; then
+    _packages="$_packages jack"
   fi
 
   PRINT ""
@@ -4317,6 +4330,14 @@ print_info() {
     _buildargs="$_buildargs $_1"
   fi
 
+  if [ "$WITH_JACK" = true ]; then
+    _1="-D WITH_JACK=ON"
+    _2="-D WITH_JACK_DYNLOAD=ON"
+    PRINT "  $_1"
+    PRINT "  $_2"
+    _buildargs="$_buildargs $_1 $_2"
+  fi
+
   if [ "$ALEMBIC_SKIP" = false ]; then
     _1="-D WITH_ALEMBIC=ON"
     PRINT "  $_1"
index 6cf18e28e17f7142e9ec39e6cacf3c831e808f72..d6e7d98f3719c3e483143f0e00ea0b4da79e5fe4 100644 (file)
@@ -83,6 +83,8 @@ enum {
        IDWALK_NOP      = 0,
        IDWALK_READONLY = (1 << 0),
        IDWALK_RECURSE  = (1 << 1),  /* Also implies IDWALK_READONLY. */
+
+       IDWALK_NO_INDIRECT_PROXY_DATA_USAGE = (1 << 8),  /* Ugly special case :(((( */
 };
 
 /* Loop over all of the ID's this datablock links to. */
index 53d438a0fddce8dd595d3db190f64fc274990635..fd37fd762f4318e9d521ba3303e7cf33c8311351 100644 (file)
@@ -46,6 +46,11 @@ enum {
        /* This tells the callback func to force setting IDs using target one with a 'never NULL' pointer to NULL.
         * WARNING! Use with extreme care, this will leave database in broken state and can cause crashes very easily! */
        ID_REMAP_FORCE_NEVER_NULL_USAGE = 1 << 3,
+       /* Do not consider proxy/_group pointers of local objects as indirect usages...
+        * Our oh-so-beloved proxies again... Do not consider data used by local proxy object as indirect usage.
+        * This is needed e.g. in reload scenario, since we have to ensure remapping of Armature data of local proxy
+        * is also performed. Usual nightmare... */
+       ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE = 1 << 4,
 };
 
 /* Note: Requiring new_id to be non-null, this *may* not be the case ultimately, but makes things simpler for now. */
index 8a42a3334bd83ab5718146591afa8b13a266349f..e397dcf76674eb8b20d137fa9d16d365bf25c0c1 100644 (file)
@@ -536,7 +536,8 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
 
                                /* Object is special, proxies make things hard... */
                                const int data_cb_flag = data.cb_flag;
-                               const int proxy_cb_flag = (object->proxy || object->proxy_group) ? IDWALK_CB_INDIRECT_USAGE : 0;
+                               const int proxy_cb_flag = ((data.flag & IDWALK_NO_INDIRECT_PROXY_DATA_USAGE) == 0 && (object->proxy || object->proxy_group)) ?
+                                                             IDWALK_CB_INDIRECT_USAGE : 0;
 
                                /* object data special case */
                                data.cb_flag |= proxy_cb_flag;
index f855de0dac5f21cec0cd2142d9c06c6bbaa3e572..a260dffea2f2d16cd7caccdd7fabf0358a0dc571 100644 (file)
@@ -447,6 +447,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
        IDRemap id_remap_data;
        ListBase *lb_array[MAX_LIBARRAY];
        int i;
+       const int foreach_id_flags = (remap_flags & ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE) != 0 ? IDWALK_NO_INDIRECT_PROXY_DATA_USAGE : IDWALK_NOP;
 
        if (r_id_remap_data == NULL) {
                r_id_remap_data = &id_remap_data;
@@ -467,7 +468,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
 #endif
                r_id_remap_data->id = id;
                libblock_remap_data_preprocess(r_id_remap_data);
-               BKE_library_foreach_ID_link(NULL, id, foreach_libblock_remap_callback, (void *)r_id_remap_data, IDWALK_NOP);
+               BKE_library_foreach_ID_link(NULL, id, foreach_libblock_remap_callback, (void *)r_id_remap_data, foreach_id_flags);
        }
        else {
                i = set_listbasepointers(bmain, lb_array);
@@ -484,7 +485,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
                                        r_id_remap_data->id = id_curr;
                                        libblock_remap_data_preprocess(r_id_remap_data);
                                        BKE_library_foreach_ID_link(
-                                                   NULL, id_curr, foreach_libblock_remap_callback, (void *)r_id_remap_data, IDWALK_NOP);
+                                                   NULL, id_curr, foreach_libblock_remap_callback, (void *)r_id_remap_data, foreach_id_flags);
                                }
                        }
                }
index 49d7c6856b94e77205db64c167490b9a1ba874b1..17d7c8967dece1408fd902768c9c27c6582ec4ae 100644 (file)
@@ -1846,7 +1846,7 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv
 {
        /* present a prompt to informing users that this change is irreversible */
        return WM_operator_confirm_message(C, op,
-                                          "Purging unused data-blocks cannot be undone. "
+                                          "Purging unused data-blocks cannot be undone and saves to current .blend file. "
                                           "Click here to proceed...");
 }
 
@@ -1868,7 +1868,8 @@ void OUTLINER_OT_orphans_purge(wmOperatorType *ot)
        /* identifiers */
        ot->idname = "OUTLINER_OT_orphans_purge";
        ot->name = "Purge All";
-       ot->description = "Clear all orphaned data-blocks without any users from the file (cannot be undone)";
+       ot->description = "Clear all orphaned data-blocks without any users from the file "
+                         "(cannot be undone, saves to current .blend file)";
        
        /* callbacks */
        ot->invoke = outliner_orphans_purge_invoke;
index 3c7a48662f813c20376929548e4e5a5c25f63e41..ff37765b683a00b6384ad2542b657e991914b756 100644 (file)
@@ -672,7 +672,8 @@ static void lib_relocate_do(
        }
 
        /* Note that in reload case, we also want to replace indirect usages. */
-       const short remap_flags = ID_REMAP_SKIP_NEVER_NULL_USAGE | (do_reload ? 0 : ID_REMAP_SKIP_INDIRECT_USAGE);
+       const short remap_flags = ID_REMAP_SKIP_NEVER_NULL_USAGE | ID_REMAP_NO_INDIRECT_PROXY_DATA_USAGE |
+                                 (do_reload ? 0 : ID_REMAP_SKIP_INDIRECT_USAGE);
        for (item_idx = 0, itemlink = lapp_data->items.list; itemlink; item_idx++, itemlink = itemlink->next) {
                WMLinkAppendDataItem *item = itemlink->link;
                ID *old_id = item->customdata;