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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-02-27 19:09:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-02-28 18:35:12 +0300
commit846d265a06e39c86574cba6722495b6373596c7a (patch)
treec8534796d130c03faa4bcdc3d7fa558f1a361113 /source/blender/makesdna
parent7895c6b83db862b13afee1facd8b6dc5e24dbede (diff)
Split base flags on own and collection-defined
This allows to update base flags to a proper state then object's restriction flags are changed, without requiring to re-evaluate an entire tree of flags. Some old unused flags are were removed by this change, and also disabling menu items might not work the same as before. This is something we can bring back if it's really needed (the way how flags are handled did change since that interface code was done anyway, so code was looking weird anyway). Reviewers: brecht Differential Revision: https://developer.blender.org/D4420
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_layer_types.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index ce51be0d620..aa7ca2ca987 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -30,9 +30,18 @@ extern "C" {
typedef struct Base {
struct Base *next, *prev;
+
+ /* Flags which are based on the collections flags evaluation, does not
+ * include flags from object's restrictions. */
+ short flag_from_collection;
+
+ /* Final flags, including both accumulated collection flags and object's
+ * restriction flags. */
short flag;
+
unsigned short local_view_bits;
short sx, sy;
+ char _pad1[6];
struct Object *object;
unsigned int lay DNA_DEPRECATED;
int flag_legacy;
@@ -66,8 +75,7 @@ typedef struct ViewLayer {
/** MAX_NAME. */
char name[64];
short flag;
- short runtime_flag;
- char _pad[4];
+ char _pad[6];
/** ObjectBase. */
ListBase object_bases;
/** Default allocated now. */
@@ -131,10 +139,7 @@ enum {
/* Layer Collection->runtime_flag */
enum {
LAYER_COLLECTION_HAS_OBJECTS = (1 << 0),
- LAYER_COLLECTION_HAS_VISIBLE_OBJECTS = (1 << 1),
- LAYER_COLLECTION_HAS_HIDDEN_OBJECTS = (1 << 2),
- LAYER_COLLECTION_HAS_ENABLED_OBJECTS = (1 << 3),
- LAYER_COLLECTION_VISIBLE = (1 << 4),
+ LAYER_COLLECTION_VISIBLE = (1 << 1),
};
/* ViewLayer->flag */
@@ -144,11 +149,6 @@ enum {
VIEW_LAYER_FREESTYLE = (1 << 2),
};
-/* ViewLayer->runtime_flag */
-enum {
- VIEW_LAYER_HAS_HIDE = (1 << 0),
-};
-
/****************************** Deprecated ******************************/
/* Compatibility with collections saved in early 2.8 versions,