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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user