[Bf-blender-cvs] [11aa479a4ec] uuid-undo-experiments: Cleanup: rename BKE_lib_id's ID swap functions to follow new naming scheme.

Bastien Montagne noreply at git.blender.org
Tue Mar 17 11:01:45 CET 2020


Commit: 11aa479a4ec759b73feb676fd7a69add8bd10629
Author: Bastien Montagne
Date:   Tue Mar 17 11:01:03 2020 +0100
Branches: uuid-undo-experiments
https://developer.blender.org/rB11aa479a4ec759b73feb676fd7a69add8bd10629

Cleanup: rename BKE_lib_id's ID swap functions to follow new naming scheme.

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

M	source/blender/blenkernel/BKE_lib_id.h
M	source/blender/blenkernel/intern/lib_id.c
M	source/blender/blenkernel/intern/lib_override.c
M	source/blender/blenloader/intern/readfile.c

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

diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h
index d23465a3f02..25ccc5bd5b6 100644
--- a/source/blender/blenkernel/BKE_lib_id.h
+++ b/source/blender/blenkernel/BKE_lib_id.h
@@ -218,8 +218,8 @@ bool BKE_id_copy_is_allowed(const struct ID *id);
 bool BKE_id_copy(struct Main *bmain, const struct ID *id, struct ID **newid);
 bool BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag);
 
-void BKE_id_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b);
-void BKE_id_full_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b);
+void BKE_lib_id_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b);
+void BKE_lib_id_swap_full(struct Main *bmain, struct ID *id_a, struct ID *id_b);
 
 void id_sort_by_name(struct ListBase *lb, struct ID *id, struct ID *id_sorting_hint);
 void BKE_lib_id_expand_local(struct Main *bmain, struct ID *id);
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index 91b6a245d7a..1ae53f5a85d 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -675,7 +675,7 @@ static void id_swap(Main *bmain, ID *id_a, ID *id_b, const bool do_full_id)
  * \param bmain May be NULL, in which case there will be no remapping of internal pointers to
  * itself.
  */
-void BKE_id_swap(Main *bmain, ID *id_a, ID *id_b)
+void BKE_lib_id_swap(Main *bmain, ID *id_a, ID *id_b)
 {
   id_swap(bmain, id_a, id_b, false);
 }
@@ -687,7 +687,7 @@ void BKE_id_swap(Main *bmain, ID *id_a, ID *id_b)
  * \param bmain May be NULL, in which case there will be no remapping of internal pointers to
  * itself.
  */
-void BKE_id_full_swap(Main *bmain, ID *id_a, ID *id_b)
+void BKE_lib_id_swap_full(Main *bmain, ID *id_a, ID *id_b)
 {
   id_swap(bmain, id_a, id_b, true);
 }
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index af861b5b0e9..81f7e158b40 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -813,7 +813,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local)
 
   /* This also transfers all pointers (memory) owned by local to tmp_id, and vice-versa.
    * So when we'll free tmp_id, we'll actually free old, outdated data from local. */
-  BKE_id_swap(bmain, local, tmp_id);
+  BKE_lib_id_swap(bmain, local, tmp_id);
 
   /* Again, horribly inn-efficient in our case, we need something off-Main
    * (aka more generic nolib copy/free stuff)! */
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a94dc94b0f1..c3fba697bd3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9498,7 +9498,7 @@ static BHead *read_libblock(FileData *fd,
     /* We do not need any remapping from this call here, since no ID pointer is valid in the data
      * currently (they are all pointing to old addresses, and need to go through `lib_link`
      * process). So we can pass NULL for the Main pointer parameter. */
-    BKE_id_full_swap(NULL, id, id_old);
+    BKE_lib_id_swap_full(NULL, id, id_old);
 
     BLI_addtail(new_lb, id_old);
     BLI_addtail(old_lb, id);



More information about the Bf-blender-cvs mailing list