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/blenloader/intern/versioning_280.c
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/blenloader/intern/versioning_280.c')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 93959237f29..9d65488e8d4 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -321,7 +321,7 @@ static void do_version_layer_collection_post(ViewLayer *view_layer,
lc->flag |= LAYER_COLLECTION_EXCLUDE;
}
if (enabled && !selectable) {
- lc->collection->flag |= COLLECTION_RESTRICT_SELECT;
+ lc->collection->flag |= COLLECTION_HIDE_SELECT;
}
}
@@ -450,7 +450,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
collections[layer] = collection;
if (!(scene->lay & (1 << layer))) {
- collection->flag |= COLLECTION_RESTRICT_VIEWPORT | COLLECTION_RESTRICT_RENDER;
+ collection->flag |= COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_RENDER;
}
}
@@ -1198,7 +1198,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
/* Add fake user for all existing groups. */
id_fake_user_set(&collection->id);
- if (collection->flag & (COLLECTION_RESTRICT_VIEWPORT | COLLECTION_RESTRICT_RENDER)) {
+ if (collection->flag & (COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_RENDER)) {
continue;
}
@@ -1229,8 +1229,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
char name[MAX_ID_NAME];
BLI_snprintf(name, sizeof(name), DATA_("Hidden %d"), coll_idx + 1);
*collection_hidden = BKE_collection_add(bmain, collection, name);
- (*collection_hidden)->flag |= COLLECTION_RESTRICT_VIEWPORT |
- COLLECTION_RESTRICT_RENDER;
+ (*collection_hidden)->flag |= COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_RENDER;
}
BKE_collection_object_add(bmain, *collection_hidden, ob);
@@ -4083,9 +4082,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 280, 75)) {
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
if (scene->master_collection != NULL) {
- scene->master_collection->flag &= ~(COLLECTION_RESTRICT_VIEWPORT |
- COLLECTION_RESTRICT_SELECT |
- COLLECTION_RESTRICT_RENDER);
+ scene->master_collection->flag &= ~(COLLECTION_HIDE_VIEWPORT | COLLECTION_HIDE_SELECT |
+ COLLECTION_HIDE_RENDER);
}
UnitSettings *unit = &scene->unit;