Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/lib_query.c')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index cbbe07f99d8..b748061ef8a 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -56,7 +56,7 @@ typedef struct LibraryForeachIDData {
*/
ID *self_id;
- /** Flags controlling the bahaviour of the 'foreach id' looping code. */
+ /** Flags controlling the behavior of the 'foreach id' looping code. */
int flag;
/** Generic flags to be passed to all callback calls for current processed data. */
int cb_flag;
@@ -244,9 +244,10 @@ static void library_foreach_ID_link(Main *bmain,
* (the node tree), but re-use those generated for the 'owner' ID (the material). */
if (inherit_data == NULL) {
data.cb_flag = ID_IS_LINKED(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
- /* When an ID is not in Main database, it should never refcount IDs it is using.
- * Exceptions: NodeTrees (yeah!) directly used by Materials. */
- data.cb_flag_clear = (id->tag & LIB_TAG_NO_MAIN) ? IDWALK_CB_USER | IDWALK_CB_USER_ONE : 0;
+ /* When an ID is defined as not refcounting its ID usages, it should never do it. */
+ data.cb_flag_clear = (id->tag & LIB_TAG_NO_USER_REFCOUNT) ?
+ IDWALK_CB_USER | IDWALK_CB_USER_ONE :
+ 0;
}
else {
data.cb_flag = inherit_data->cb_flag;