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:
authorBrecht Van Lommel <brecht@blender.org>2021-08-04 18:46:55 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-08-04 20:18:34 +0300
commit8abf6efcf60fa7f609f38fda0e085d84a72b6dba (patch)
tree29a330737f179f0d632dc76ead0cbd5370fc26b0 /source/blender/makesdna
parent10b9621079823048e73d4677413bc5e59f833dcf (diff)
Cleanup: rename restrict to hide/visibility in Object, Collection, MaskLayer
This makes the internal naming consistent with the public API. And also gives us a visibility_flag rather than restrictflag that can be extended with more flags.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_collection_types.h6
-rw-r--r--source/blender/makesdna/DNA_layer_types.h2
-rw-r--r--source/blender/makesdna/DNA_mask_types.h10
-rw-r--r--source/blender/makesdna/DNA_object_types.h10
-rw-r--r--source/blender/makesdna/intern/dna_rename_defs.h2
5 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/makesdna/DNA_collection_types.h b/source/blender/makesdna/DNA_collection_types.h
index 1defa8b782b..3eba02de2a3 100644
--- a/source/blender/makesdna/DNA_collection_types.h
+++ b/source/blender/makesdna/DNA_collection_types.h
@@ -102,10 +102,10 @@ typedef struct Collection {
/* Collection->flag */
enum {
- COLLECTION_RESTRICT_VIEWPORT = (1 << 0), /* Disable in viewports. */
- COLLECTION_RESTRICT_SELECT = (1 << 1), /* Not selectable in viewport. */
+ COLLECTION_HIDE_VIEWPORT = (1 << 0), /* Disable in viewports. */
+ COLLECTION_HIDE_SELECT = (1 << 1), /* Not selectable in viewport. */
/* COLLECTION_DISABLED_DEPRECATED = (1 << 2), */ /* Not used anymore */
- COLLECTION_RESTRICT_RENDER = (1 << 3), /* Disable in renders. */
+ COLLECTION_HIDE_RENDER = (1 << 3), /* Disable in renders. */
COLLECTION_HAS_OBJECT_CACHE = (1 << 4), /* Runtime: object_cache is populated. */
COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */
COLLECTION_HAS_OBJECT_CACHE_INSTANCED = (1 << 6), /* for object_cache_instanced. */
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
index 828c6ff2a51..63e4597150c 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -222,7 +222,7 @@ enum {
enum {
LAYER_COLLECTION_HAS_OBJECTS = (1 << 0),
/* LAYER_COLLECTION_VISIBLE_DEPSGRAPH = (1 << 1), */ /* UNUSED */
- LAYER_COLLECTION_RESTRICT_VIEWPORT = (1 << 2),
+ LAYER_COLLECTION_HIDE_VIEWPORT = (1 << 2),
LAYER_COLLECTION_VISIBLE_VIEW_LAYER = (1 << 4),
};
diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h
index e6a7c004078..419118a38f4 100644
--- a/source/blender/makesdna/DNA_mask_types.h
+++ b/source/blender/makesdna/DNA_mask_types.h
@@ -174,7 +174,7 @@ typedef struct MaskLayer {
/** For animation. */
char flag;
/** Matching 'Object' flag of the same name - eventually use in the outliner. */
- char restrictflag;
+ char visibility_flag;
} MaskLayer;
/* MaskParent->flag */
@@ -206,10 +206,10 @@ enum {
MASK_SPLINE_OFFSET_SMOOTH = 1,
};
-/* ob->restrictflag */
-#define MASK_RESTRICT_VIEW (1 << 0)
-#define MASK_RESTRICT_SELECT (1 << 1)
-#define MASK_RESTRICT_RENDER (1 << 2)
+/* MaskLayer->visibility_flag */
+#define MASK_HIDE_VIEW (1 << 0)
+#define MASK_HIDE_SELECT (1 << 1)
+#define MASK_HIDE_RENDER (1 << 2)
/* SpaceClip->mask_draw_flag */
#define MASK_DRAWFLAG_SMOOTH (1 << 0)
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 60a34fef899..a37536f7022 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -385,7 +385,7 @@ typedef struct Object {
short softflag;
/** For restricting view, select, render etc. accessible in outliner. */
- char restrictflag;
+ char visibility_flag;
/** Flag for pinning. */
char shapeflag;
@@ -670,11 +670,11 @@ enum {
# define OB_FLAG_UNUSED_12 (1 << 12) /* cleared */
#endif
-/* ob->restrictflag */
+/* ob->visibility_flag */
enum {
- OB_RESTRICT_VIEWPORT = 1 << 0,
- OB_RESTRICT_SELECT = 1 << 1,
- OB_RESTRICT_RENDER = 1 << 2,
+ OB_HIDE_VIEWPORT = 1 << 0,
+ OB_HIDE_SELECT = 1 << 1,
+ OB_HIDE_RENDER = 1 << 2,
};
/* ob->shapeflag */
diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h
index d363e40e4f0..2feebbfd4f4 100644
--- a/source/blender/makesdna/intern/dna_rename_defs.h
+++ b/source/blender/makesdna/intern/dna_rename_defs.h
@@ -82,11 +82,13 @@ DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_vel_factor, guide_vel_factor
DNA_STRUCT_RENAME_ELEM(FluidEffectorSettings, guiding_mode, guide_mode)
DNA_STRUCT_RENAME_ELEM(Image, name, filepath)
DNA_STRUCT_RENAME_ELEM(Library, name, filepath)
+DNA_STRUCT_RENAME_ELEM(MaskLayer, restrictflag, visibility_flag)
DNA_STRUCT_RENAME_ELEM(MovieClip, name, filepath)
DNA_STRUCT_RENAME_ELEM(Object, col, color)
DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection)
DNA_STRUCT_RENAME_ELEM(Object, dupfacesca, instance_faces_scale)
DNA_STRUCT_RENAME_ELEM(Object, size, scale)
+DNA_STRUCT_RENAME_ELEM(Object, restrictflag, visibility_flag)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_group, instance_collection)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_ob, instance_object)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dupliweights, instance_weights)