[Bf-blender-cvs] [312c8fdaf92] master: Cleanup: Better naming in lib_remap.

Jeroen Bakker noreply at git.blender.org
Wed Feb 9 11:44:23 CET 2022


Commit: 312c8fdaf927421e697da0185360240bafd64a4b
Author: Jeroen Bakker
Date:   Wed Feb 9 11:44:14 2022 +0100
Branches: master
https://developer.blender.org/rB312c8fdaf927421e697da0185360240bafd64a4b

Cleanup: Better naming in lib_remap.

Renames is_never_null to violates_never_null.

===================================================================

M	release/datafiles/locale
M	release/scripts/addons
M	source/blender/blenkernel/intern/lib_remap.c
M	source/tools

===================================================================

diff --git a/release/datafiles/locale b/release/datafiles/locale
index 05005841745..2d12637a69d 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 050058417452bfba0cc9ae8692173eb02ac1ef3a
+Subproject commit 2d12637a69df7643484a8a3655b7eeb6faa170a7
diff --git a/release/scripts/addons b/release/scripts/addons
index faa9fc7f98e..e1d44bf3750 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit faa9fc7f98e19be54a715c24061185b04dff5b6c
+Subproject commit e1d44bf37501eb19a057777bd0b0ba4484773531
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c
index a9de5b4a189..8e375ff16b5 100644
--- a/source/blender/blenkernel/intern/lib_remap.c
+++ b/source/blender/blenkernel/intern/lib_remap.c
@@ -97,14 +97,14 @@ static void foreach_libblock_remap_callback_skip(const ID *UNUSED(id_owner),
                                                  const int cb_flag,
                                                  const bool is_indirect,
                                                  const bool is_reference,
-                                                 const bool is_never_null,
+                                                 const bool violates_never_null,
                                                  const bool UNUSED(is_obj),
                                                  const bool is_obj_editmode)
 {
   if (is_indirect) {
     id_remap_data->skipped_indirect++;
   }
-  else if (is_never_null || is_obj_editmode || is_reference) {
+  else if (violates_never_null || is_obj_editmode || is_reference) {
     id_remap_data->skipped_direct++;
   }
   else {
@@ -127,10 +127,10 @@ static void foreach_libblock_remap_callback_apply(ID *id_owner,
                                                   IDRemap *id_remap_data,
                                                   const int cb_flag,
                                                   const bool is_indirect,
-                                                  const bool is_never_null,
+                                                  const bool violates_never_null,
                                                   const bool force_user_refcount)
 {
-  if (!is_never_null) {
+  if (!violates_never_null) {
     *id_ptr = new_id;
     DEG_id_tag_update_ex(id_remap_data->bmain,
                          id_self,
@@ -210,8 +210,8 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
    * remapped in this situation. */
   const bool is_obj_editmode = (is_obj && BKE_object_is_in_editmode((Object *)id_owner) &&
                                 (id_remap_data->flag & ID_REMAP_FORCE_OBDATA_IN_EDITMODE) == 0);
-  const bool is_never_null = ((cb_flag & IDWALK_CB_NEVER_NULL) && (new_id == NULL) &&
-                              (id_remap_data->flag & ID_REMAP_FORCE_NEVER_NULL_USAGE) == 0);
+  const bool violates_never_null = ((cb_flag & IDWALK_CB_NEVER_NULL) && (new_id == NULL) &&
+                                    (id_remap_data->flag & ID_REMAP_FORCE_NEVER_NULL_USAGE) == 0);
   const bool skip_reference = (id_remap_data->flag & ID_REMAP_SKIP_OVERRIDE_LIBRARY) != 0;
   const bool skip_never_null = (id_remap_data->flag & ID_REMAP_SKIP_NEVER_NULL_USAGE) != 0;
   const bool force_user_refcount = (id_remap_data->flag & ID_REMAP_FORCE_USER_REFCOUNT) != 0;
@@ -239,7 +239,7 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
   /* Special hack in case it's Object->data and we are in edit mode, and new_id is not NULL
    * (otherwise, we follow common NEVER_NULL flags).
    * (skipped_indirect too). */
-  if ((is_never_null && skip_never_null) ||
+  if ((violates_never_null && skip_never_null) ||
       (is_obj_editmode && (((Object *)id_owner)->data == *id_p) && new_id != NULL) ||
       (skip_indirect && is_indirect) || (is_reference && skip_reference)) {
     foreach_libblock_remap_callback_skip(id_owner,
@@ -248,7 +248,7 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
                                          cb_flag,
                                          is_indirect,
                                          is_reference,
-                                         is_never_null,
+                                         violates_never_null,
                                          is_obj,
                                          is_obj_editmode);
   }
@@ -261,7 +261,7 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
                                           id_remap_data,
                                           cb_flag,
                                           is_indirect,
-                                          is_never_null,
+                                          violates_never_null,
                                           force_user_refcount);
   }
 
diff --git a/source/tools b/source/tools
index 7fd2ed908b4..515e67c1932 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 7fd2ed908b4f50140670caf6786e5ed245b79137
+Subproject commit 515e67c1932bc06f24cb50b621265c2a6e8a25a9



More information about the Bf-blender-cvs mailing list