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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-04-30 18:52:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-01 10:17:17 +0300
commitaf508a1e39c002db8e07886e042378c12b8fc136 (patch)
tree8759c92111f06635ba7cba870caed0df452f08cd /source
parent2bd2a2ac0334e428b3b5e8340737d0992a2c3d3a (diff)
Mark localized node trees and materials as such
Makes it easier to see where the datablock is coming from.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/node.c2
-rw-r--r--source/blender/makesdna/DNA_ID.h9
3 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 39ad95e9183..2f2f2fb3599 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -199,7 +199,9 @@ Material *BKE_material_localize(Material *ma)
BLI_listbase_clear(&man->gpumaterial);
/* TODO Duplicate Engine Settings and set runtime to NULL */
-
+
+ man->id.tag |= LIB_TAG_LOCALIZED;
+
return man;
}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index def8ea1d239..62c3bb5be35 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -2051,6 +2051,8 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
if (ntree->typeinfo->localize)
ntree->typeinfo->localize(ltree, ntree);
+ ltree->id.tag |= LIB_TAG_LOCALIZED;
+
BLI_mutex_unlock(ntree->duplilock);
return ltree;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index daa4a3d9ca3..bcce2764eaf 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -457,16 +457,17 @@ enum {
/* RESET_AFTER_USE tag existing data before linking so we know what is new. */
LIB_TAG_PRE_EXISTING = 1 << 11,
- /* The datablock is a copy-on-write version. */
+ /* The datablock is a copy-on-write/localized version. */
LIB_TAG_COPY_ON_WRITE = 1 << 12,
LIB_TAG_COPY_ON_WRITE_EVAL = 1 << 13,
+ LIB_TAG_LOCALIZED = 1 << 14,
/* RESET_NEVER tag datablock for freeing etc. behavior (usually set when copying real one into temp/runtime one). */
- LIB_TAG_NO_MAIN = 1 << 14, /* Datablock is not listed in Main database. */
- LIB_TAG_NO_USER_REFCOUNT = 1 << 15, /* Datablock does not refcount usages of other IDs. */
+ LIB_TAG_NO_MAIN = 1 << 15, /* Datablock is not listed in Main database. */
+ LIB_TAG_NO_USER_REFCOUNT = 1 << 16, /* Datablock does not refcount usages of other IDs. */
/* Datablock was not allocated by standard system (BKE_libblock_alloc), do not free its memory
* (usual type-specific freeing is called though). */
- LIB_TAG_NOT_ALLOCATED = 1 << 16,
+ LIB_TAG_NOT_ALLOCATED = 1 << 17,
};
/* WARNING - when adding flags check on PSYS_RECALC */