[Bf-blender-cvs] [4d9697a5a90] master: Merge branch 'blender2.7'
Brecht Van Lommel
noreply at git.blender.org
Tue Feb 26 20:10:36 CET 2019
Commit: 4d9697a5a90de08d30de373cf6dc83f8130fffdc
Author: Brecht Van Lommel
Date: Tue Feb 26 20:07:36 2019 +0100
Branches: master
https://developer.blender.org/rB4d9697a5a90de08d30de373cf6dc83f8130fffdc
Merge branch 'blender2.7'
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/readfile.c
index df653359fad,c5a8aaca11c..e269993460d
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -9520,13 -8744,13 +9520,13 @@@ BlendFileData *blo_read_file_internal(F
/* Always adds to the most recently loaded ID_LI block, see direct_link_library.
* This is part of the file format definition. */
if (fd->skip_flags & BLO_READ_SKIP_DATA) {
- bhead = blo_nextbhead(fd, bhead);
+ bhead = blo_bhead_next(fd, bhead);
}
else {
- bhead = read_libblock(fd, mainlist.last, bhead, LIB_TAG_READ | LIB_TAG_EXTERN, NULL);
+ bhead = read_libblock(fd, mainlist.last, bhead, LIB_TAG_ID_ID | LIB_TAG_EXTERN, NULL);
}
break;
- /* in 2.50+ files, the file identifier for screens is patched, forward compatibility */
+ /* in 2.50+ files, the file identifier for screens is patched, forward compatibility */
case ID_SCRN:
bhead->code = ID_SCR;
/* pass on to default */
@@@ -9788,14 -8990,9 +9788,14 @@@ static void expand_doit_library(void *f
}
}
else {
+ /* in 2.50+ file identifier for screens is patched, forward compatibility */
+ if (bhead->code == ID_SCRN) {
+ bhead->code = ID_SCR;
+ }
+
id = is_yet_read(fd, mainvar, bhead);
if (id == NULL) {
- read_libblock(fd, mainvar, bhead, LIB_TAG_TESTIND, NULL);
+ read_libblock(fd, mainvar, bhead, LIB_TAG_NEED_EXPAND | LIB_TAG_INDIRECT, NULL);
}
else {
/* this is actually only needed on UI call? when ID was already read before, and another append
@@@ -11286,13 -10494,9 +11287,13 @@@ void *BLO_library_read_struct(FileData
return read_struct(fd, bh, blockname);
}
-/* ************* READ LIBRARY ************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Library Reading
+ * \{ */
- static int mainvar_id_tag_any_check(Main *mainvar, const short tag)
+ static int mainvar_id_tag_any_check(Main *mainvar, const int tag)
{
ListBase *lbarray[MAX_LIBARRAY];
int a;
diff --cc source/blender/makesdna/DNA_ID.h
index ed063910dd6,20a3aa1d04e..5815a913d3b
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@@ -513,92 -346,22 +511,92 @@@ enum
/* RESET_AFTER_USE tag existing data before linking so we know what is new. */
LIB_TAG_PRE_EXISTING = 1 << 11,
- /* RESET_NEVER tag datablock for freeing etc. behavior (usually set when copying real one into temp/runtime one). */
- LIB_TAG_NO_MAIN = 1 << 12, /* Datablock is not listed in Main database. */
- LIB_TAG_NO_USER_REFCOUNT = 1 << 13, /* Datablock does not refcount usages of other IDs. */
+ /* The datablock is a copy-on-write/localized version. */
+ LIB_TAG_COPIED_ON_WRITE = 1 << 12,
+ LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT = 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 << 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 << 17,
- LIB_TAG_NOT_ALLOCATED = 1 << 14,
++ LIB_TAG_NOT_ALLOCATED = 1 << 18,
};
-enum {
- /* RESET_AFTER_USE, used by update code (depsgraph). */
- ID_RECALC_NONE = 0,
- ID_RECALC = 1 << 0,
- ID_RECALC_DATA = 1 << 1,
- ID_RECALC_SKIP_ANIM_TAG = 1 << 2,
- ID_RECALC_ALL = (ID_RECALC | ID_RECALC_DATA),
-};
+/* Tag given ID for an update in all the dependency graphs. */
+typedef enum IDRecalcFlag {
+ /* Individual update tags, this is what ID gets tagged for update with. */
+
+ /* ** Object transformation changed. ** */
+ ID_RECALC_TRANSFORM = (1 << 0),
+
+ /* ** Object geometry changed. **
+ *
+ * When object of armature type gets tagged with this flag, it's pose is
+ * re-evaluated.
+ * When object of other type is tagged with this flag it makes the modifier
+ * stack to be re-evaluated.
+ * When object data type (mesh, curve, ...) gets tagged with this flag it
+ * makes all objects which shares this datablock to be updated. */
+ ID_RECALC_GEOMETRY = (1 << 1),
+
+ /* ** Animation or time changed and animation is to be re-evaluated. ** */
+ ID_RECALC_ANIMATION = (1 << 2),
+
+ /* ** Particle system changed. ** */
+ /* Only do pathcache etc. */
+ ID_RECALC_PSYS_REDO = (1 << 3),
+ /* Reset everything including pointcache. */
+ ID_RECALC_PSYS_RESET = (1 << 4),
+ /* Only child settings changed. */
+ ID_RECALC_PSYS_CHILD = (1 << 5),
+ /* Physics type changed. */
+ ID_RECALC_PSYS_PHYS = (1 << 6),
+
+ /* ** Material and shading ** */
+
+ /* For materials and node trees this means that topology of the shader tree
+ * changed, and the shader is to be recompiled.
+ * For objects it means that the draw batch cache is to be redone. */
+ ID_RECALC_SHADING = (1 << 7),
+ /* TODO(sergey): Consider adding an explicit ID_RECALC_SHADING_PARAMATERS
+ * which can be used for cases when only socket value changed, to speed up
+ * redraw update in that case. */
+
+ /* Selection of the ID itself or its components (for example, vertices) did
+ * change, and all the drawing data is to eb updated. */
+ ID_RECALC_SELECT = (1 << 9),
+ /* Flags on the base did change, and is to be compied onto all the copies of
+ * corresponding objects. */
+ ID_RECALC_BASE_FLAGS = (1 << 10),
+ ID_RECALC_POINT_CACHE = (1 << 11),
+ /* Only inform editors about the change. Is used to force update of editors
+ * when datablock which is not a part of dependency graph did change.
+ *
+ * For example, brush texture did change and the preview is to be
+ * re-rendered. */
+ ID_RECALC_EDITORS = (1 << 12),
+
+ /* ** Update copy on write component. **
+ * This is most generic tag which should only be used when nothing else
+ * matches.
+ */
+ ID_RECALC_COPY_ON_WRITE = (1 << 13),
+
+ /* Aggregate flags, use only for checks on runtime.
+ * Do NOT use those for tagging. */
+
+ /* Identifies that SOMETHING has been changed in this ID. */
+ ID_RECALC_ALL = ~(0),
+ /* Identifies that something in particle system did change. */
+ ID_RECALC_PSYS_ALL = (ID_RECALC_PSYS_REDO |
+ ID_RECALC_PSYS_RESET |
+ ID_RECALC_PSYS_CHILD |
+ ID_RECALC_PSYS_PHYS),
+
+} IDRecalcFlag;
/* To filter ID types (filter_id) */
/* XXX We cannot put all needed IDs inside an enum...
More information about the Bf-blender-cvs
mailing list