[Bf-blender-cvs] [cedf9f5cb79] master: Fix/cleanup: lib_query: missing case handling of new ID_SIM type.

Bastien Montagne noreply at git.blender.org
Wed Apr 29 11:07:19 CEST 2020


Commit: cedf9f5cb793af26d72479931ba31db620e1dc30
Author: Bastien Montagne
Date:   Wed Apr 29 11:05:45 2020 +0200
Branches: master
https://developer.blender.org/rBcedf9f5cb793af26d72479931ba31db620e1dc30

Fix/cleanup: lib_query: missing case handling of new ID_SIM type.

Also update comments.

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

M	source/blender/blenkernel/intern/lib_query.c

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

diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index d755fb2ca49..2e3f72dc788 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -1341,14 +1341,11 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cb_flag)
 }
 
 /**
- * Say whether given \a id_type_owner can use (in any way) a data-block of \a id_type_used.
+ * Say whether given \a id_owner may use (in any way) a data-block of \a id_type_used.
  *
  * This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above,
- * quite useful to reduce* useless iterations in some cases.
+ * quite useful to reduce useless iterations in some cases.
  */
-/* XXX This has to be fully rethink, basing check on ID type is not really working anymore
- * (and even worth once IDProps will support ID pointers),
- * we'll have to do some quick checks on IDs themselves... */
 bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
 {
   /* any type of ID can be used in custom props. */
@@ -1458,6 +1455,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
     case ID_PAL:
     case ID_PC:
     case ID_CF:
+    case ID_SIM:
       /* Those types never use/reference other IDs... */
       return false;
     case ID_IP:



More information about the Bf-blender-cvs mailing list