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/editors
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/editors')
-rw-r--r--source/blender/editors/animation/anim_filter.c4
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/mask/mask_add.c2
-rw-r--r--source/blender/editors/mask/mask_draw.c8
-rw-r--r--source/blender/editors/mask/mask_ops.c24
-rw-r--r--source/blender/editors/mask/mask_query.c8
-rw-r--r--source/blender/editors/mask/mask_relationships.c4
-rw-r--r--source/blender/editors/mask/mask_select.c20
-rw-r--r--source/blender/editors/mask/mask_shapekey.c4
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c10
-rw-r--r--source/blender/editors/object/object_edit.c6
-rw-r--r--source/blender/editors/render/render_preview.c8
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_utils.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c10
-rw-r--r--source/blender/editors/transform/transform_convert_mask.c4
17 files changed, 60 insertions, 60 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index b2d387ea898..020518b5813 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1892,7 +1892,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
}
/* outliner restrict-flag */
- if (ob->restrictflag & OB_RESTRICT_VIEWPORT) {
+ if (ob->visibility_flag & OB_HIDE_VIEWPORT) {
continue;
}
}
@@ -3098,7 +3098,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m
}
/* outliner restrict-flag */
- if (ob->restrictflag & OB_RESTRICT_VIEWPORT) {
+ if (ob->visibility_flag & OB_HIDE_VIEWPORT) {
return false;
}
}
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index cfcea950955..0de3f429bc7 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -445,7 +445,7 @@ static void draw_marker_name(const uchar *text_color,
if (marker->camera) {
Object *camera = marker->camera;
name = camera->id.name + 2;
- if (camera->restrictflag & OB_RESTRICT_RENDER) {
+ if (camera->visibility_flag & OB_HIDE_RENDER) {
final_text_color[3] = 100;
}
}
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index ad71f4d9da7..110f4541e8f 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -521,7 +521,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
MaskLayer *mask_layer = BKE_mask_layer_active(mask);
- if (mask_layer && mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer && mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
mask_layer = NULL;
}
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index de8ea8e21eb..22232e9c87e 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -191,7 +191,7 @@ static void draw_spline_points(const bContext *C,
const char draw_type)
{
const bool is_spline_sel = (spline->flag & SELECT) &&
- (mask_layer->restrictflag & MASK_RESTRICT_SELECT) == 0;
+ (mask_layer->visibility_flag & MASK_HIDE_SELECT) == 0;
const bool is_smooth = (draw_flag & MASK_DRAWFLAG_SMOOTH) != 0;
uchar rgb_spline[4];
@@ -529,7 +529,7 @@ static void draw_spline_curve(const bContext *C,
uchar rgb_tmp[4];
const bool is_spline_sel = (spline->flag & SELECT) &&
- (mask_layer->restrictflag & MASK_RESTRICT_SELECT) == 0;
+ (mask_layer->visibility_flag & MASK_HIDE_SELECT) == 0;
const bool is_smooth = (draw_flag & MASK_DRAWFLAG_SMOOTH) != 0;
const bool is_fill = (spline->flag & MASK_SPLINE_NOFILL) == 0;
@@ -604,7 +604,7 @@ static void draw_mask_layers(const bContext *C,
mask_layer = mask_layer->next, i++) {
const bool is_active = (i == mask->masklay_act);
- if (mask_layer->restrictflag & MASK_RESTRICT_VIEW) {
+ if (mask_layer->visibility_flag & MASK_HIDE_VIEW) {
continue;
}
@@ -613,7 +613,7 @@ static void draw_mask_layers(const bContext *C,
/* draw curve itself first... */
draw_spline_curve(C, mask_layer, spline, draw_flag, draw_type, is_active, width, height);
- if (!(mask_layer->restrictflag & MASK_RESTRICT_SELECT)) {
+ if (!(mask_layer->visibility_flag & MASK_HIDE_SELECT)) {
/* ...and then handles over the curve so they're nicely visible */
draw_spline_points(C, mask_layer, spline, draw_flag, draw_type);
}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 6fa7457ce14..fd5925bbd0c 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -287,7 +287,7 @@ static bool spline_under_mouse_get(const bContext *C,
}
for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer != NULL;
mask_layer = mask_layer->next) {
- if (mask_layer->restrictflag & MASK_RESTRICT_SELECT) {
+ if (mask_layer->visibility_flag & MASK_HIDE_SELECT) {
continue;
}
@@ -1322,7 +1322,7 @@ static int cyclic_toggle_exec(bContext *C, wmOperator *UNUSED(op))
Mask *mask = CTX_data_edit_mask(C);
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -1403,7 +1403,7 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op))
MaskSpline *spline;
int mask_layer_shape_ofs = 0;
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -1523,7 +1523,7 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
bool changed_layer = false;
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -1581,7 +1581,7 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op)
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
bool changed_layer = false;
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -1642,7 +1642,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
bool changed = false;
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -1724,9 +1724,9 @@ static int mask_hide_view_clear_exec(bContext *C, wmOperator *op)
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & OB_RESTRICT_VIEWPORT) {
+ if (mask_layer->visibility_flag & OB_HIDE_VIEWPORT) {
ED_mask_layer_select_set(mask_layer, select);
- mask_layer->restrictflag &= ~OB_RESTRICT_VIEWPORT;
+ mask_layer->visibility_flag &= ~OB_HIDE_VIEWPORT;
changed = true;
}
}
@@ -1766,7 +1766,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op)
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & MASK_RESTRICT_SELECT) {
+ if (mask_layer->visibility_flag & MASK_HIDE_SELECT) {
continue;
}
@@ -1774,7 +1774,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op)
if (ED_mask_layer_select_check(mask_layer)) {
ED_mask_layer_select_set(mask_layer, false);
- mask_layer->restrictflag |= OB_RESTRICT_VIEWPORT;
+ mask_layer->visibility_flag |= OB_HIDE_VIEWPORT;
changed = true;
if (mask_layer == BKE_mask_layer_active(mask)) {
BKE_mask_layer_active_set(mask, NULL);
@@ -1783,7 +1783,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op)
}
else {
if (!ED_mask_layer_select_check(mask_layer)) {
- mask_layer->restrictflag |= OB_RESTRICT_VIEWPORT;
+ mask_layer->visibility_flag |= OB_HIDE_VIEWPORT;
changed = true;
if (mask_layer == BKE_mask_layer_active(mask)) {
BKE_mask_layer_active_set(mask, NULL);
@@ -1825,7 +1825,7 @@ static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op))
bool changed = false;
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_SELECT | MASK_RESTRICT_VIEW)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_SELECT | MASK_HIDE_VIEW)) {
continue;
}
diff --git a/source/blender/editors/mask/mask_query.c b/source/blender/editors/mask/mask_query.c
index cd51026d20c..e66c4e45e27 100644
--- a/source/blender/editors/mask/mask_query.c
+++ b/source/blender/editors/mask/mask_query.c
@@ -85,7 +85,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
*mask_layer_eval = mask_eval->masklayers.first;
mask_layer_orig != NULL;
mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) {
- if (mask_layer_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer_orig->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -245,7 +245,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C,
mask_layer_orig != NULL;
mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) {
- if (mask_layer_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer_orig->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -409,7 +409,7 @@ bool ED_mask_feather_find_nearest(const bContext *C,
int i, tot_feather_point;
float(*feather_points)[2], (*fp)[2];
- if (mask_layer_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer_orig->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -638,7 +638,7 @@ bool ED_mask_selected_minmax(const bContext *C,
INIT_MINMAX2(min, max);
for (MaskLayer *mask_layer = mask_eval->masklayers.first; mask_layer != NULL;
mask_layer = mask_layer->next) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
for (MaskSpline *spline = mask_layer->splines.first; spline != NULL; spline = spline->next) {
diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c
index 971e1c948c9..9c4740b3087 100644
--- a/source/blender/editors/mask/mask_relationships.c
+++ b/source/blender/editors/mask/mask_relationships.c
@@ -46,7 +46,7 @@ static int mask_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
Mask *mask = CTX_data_edit_mask(C);
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -138,7 +138,7 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
}
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 8ddc3758e4e..6a1be8dcef3 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -68,7 +68,7 @@ bool ED_mask_spline_select_check(const MaskSpline *spline)
bool ED_mask_layer_select_check(const MaskLayer *mask_layer)
{
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
return false;
}
@@ -110,7 +110,7 @@ void ED_mask_spline_select_set(MaskSpline *spline, const bool do_select)
void ED_mask_layer_select_set(MaskLayer *mask_layer, const bool do_select)
{
- if (mask_layer->restrictflag & MASK_RESTRICT_SELECT) {
+ if (mask_layer->visibility_flag & MASK_HIDE_SELECT) {
if (do_select == true) {
return;
}
@@ -134,7 +134,7 @@ void ED_mask_select_toggle_all(Mask *mask, int action)
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & MASK_RESTRICT_VIEW) {
+ if (mask_layer->visibility_flag & MASK_HIDE_VIEW) {
continue;
}
@@ -142,7 +142,7 @@ void ED_mask_select_toggle_all(Mask *mask, int action)
/* we don't have generic functions for this, its restricted to this operator
* if one day we need to re-use such functionality, they can be split out */
- if (mask_layer->restrictflag & MASK_RESTRICT_SELECT) {
+ if (mask_layer->visibility_flag & MASK_HIDE_SELECT) {
continue;
}
LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) {
@@ -166,7 +166,7 @@ void ED_mask_select_flush_all(Mask *mask)
/* Intentionally *don't* do this in the mask layer loop
* so we clear flags on all splines. */
- if (mask_layer->restrictflag & MASK_RESTRICT_VIEW) {
+ if (mask_layer->visibility_flag & MASK_HIDE_VIEW) {
continue;
}
@@ -465,7 +465,7 @@ static int box_select_exec(bContext *C, wmOperator *op)
/* do actual selection */
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -550,7 +550,7 @@ static bool do_lasso_select_mask(bContext *C,
/* do actual selection */
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -691,7 +691,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
/* do actual selection */
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -820,7 +820,7 @@ static int mask_select_linked_exec(bContext *C, wmOperator *UNUSED(op))
/* do actual selection */
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -870,7 +870,7 @@ static int mask_select_more_less(bContext *C, bool more)
Mask *mask = CTX_data_edit_mask(C);
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c
index a5a3489c143..6620096c39a 100644
--- a/source/blender/editors/mask/mask_shapekey.c
+++ b/source/blender/editors/mask/mask_shapekey.c
@@ -144,7 +144,7 @@ static int mask_shape_key_feather_reset_exec(bContext *C, wmOperator *UNUSED(op)
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -238,7 +238,7 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op)
const bool do_location = RNA_boolean_get(op->ptr, "location");
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 8ae74fbfafa..f98f3242163 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -3530,7 +3530,7 @@ static int object_add_named_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- basen->object->restrictflag &= ~OB_RESTRICT_VIEWPORT;
+ basen->object->visibility_flag &= ~OB_HIDE_VIEWPORT;
int mval[2];
if (object_add_drop_xy_get(C, op, &mval)) {
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 43358f51396..0a2df655395 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -1311,7 +1311,7 @@ static int bake(const BakeAPIRender *bkr,
}
else {
ob_cage_eval = DEG_get_evaluated_object(depsgraph, ob_cage);
- ob_cage_eval->restrictflag |= OB_RESTRICT_RENDER;
+ ob_cage_eval->visibility_flag |= OB_HIDE_RENDER;
ob_cage_eval->base_flag &= ~(BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER);
}
}
@@ -1411,7 +1411,7 @@ static int bake(const BakeAPIRender *bkr,
/* initialize highpoly_data */
highpoly[i].ob = ob_iter;
highpoly[i].ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter);
- highpoly[i].ob_eval->restrictflag &= ~OB_RESTRICT_RENDER;
+ highpoly[i].ob_eval->visibility_flag &= ~OB_HIDE_RENDER;
highpoly[i].ob_eval->base_flag |= (BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER);
highpoly[i].me = BKE_mesh_new_from_object(NULL, highpoly[i].ob_eval, false, false);
@@ -1427,10 +1427,10 @@ static int bake(const BakeAPIRender *bkr,
BLI_assert(i == tot_highpoly);
if (ob_cage != NULL) {
- ob_cage_eval->restrictflag |= OB_RESTRICT_RENDER;
+ ob_cage_eval->visibility_flag |= OB_HIDE_RENDER;
ob_cage_eval->base_flag &= ~(BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER);
}
- ob_low_eval->restrictflag |= OB_RESTRICT_RENDER;
+ ob_low_eval->visibility_flag |= OB_HIDE_RENDER;
ob_low_eval->base_flag &= ~(BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER);
/* populate the pixel arrays with the corresponding face data for each high poly object */
@@ -1473,7 +1473,7 @@ static int bake(const BakeAPIRender *bkr,
}
else {
/* If low poly is not renderable it should have failed long ago. */
- BLI_assert((ob_low_eval->restrictflag & OB_RESTRICT_RENDER) == 0);
+ BLI_assert((ob_low_eval->visibility_flag & OB_HIDE_RENDER) == 0);
if (RE_bake_has_engine(re)) {
ok = RE_bake_engine(re,
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 6108691b2f1..5697c2c973d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -384,7 +384,7 @@ static int object_hide_collection_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
if (v3d->flag & V3D_LOCAL_COLLECTIONS) {
- if (lc->runtime_flag & LAYER_COLLECTION_RESTRICT_VIEWPORT) {
+ if (lc->runtime_flag & LAYER_COLLECTION_HIDE_VIEWPORT) {
return OPERATOR_CANCELLED;
}
if (toggle) {
@@ -421,7 +421,7 @@ void ED_collection_hide_menu_draw(const bContext *C, uiLayout *layout)
continue;
}
- if (lc->collection->flag & COLLECTION_RESTRICT_VIEWPORT) {
+ if (lc->collection->flag & COLLECTION_HIDE_VIEWPORT) {
continue;
}
@@ -926,7 +926,7 @@ static bool editmode_toggle_poll(bContext *C)
}
/* if hidden but in edit mode, we still display */
- if ((ob->restrictflag & OB_RESTRICT_VIEWPORT) && !(ob->mode & OB_MODE_EDIT)) {
+ if ((ob->visibility_flag & OB_HIDE_VIEWPORT) && !(ob->mode & OB_MODE_EDIT)) {
return false;
}
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index fe1e850dcba..bd4c83c107e 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -273,10 +273,10 @@ static void switch_preview_collection_visibilty(ViewLayer *view_layer, const ePr
for (lc = lc->layer_collections.first; lc; lc = lc->next) {
if (STREQ(lc->collection->id.name + 2, collection_name)) {
- lc->collection->flag &= ~COLLECTION_RESTRICT_RENDER;
+ lc->collection->flag &= ~COLLECTION_HIDE_RENDER;
}
else {
- lc->collection->flag |= COLLECTION_RESTRICT_RENDER;
+ lc->collection->flag |= COLLECTION_HIDE_RENDER;
}
}
}
@@ -288,10 +288,10 @@ static void switch_preview_floor_visibility(ViewLayer *view_layer,
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
if (STREQ(base->object->id.name + 2, "Floor")) {
if (pr_method == PR_ICON_RENDER) {
- base->object->restrictflag |= OB_RESTRICT_RENDER;
+ base->object->visibility_flag |= OB_HIDE_RENDER;
}
else {
- base->object->restrictflag &= ~OB_RESTRICT_RENDER;
+ base->object->visibility_flag &= ~OB_HIDE_RENDER;
}
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 107466a8a0b..0bc2a224a4b 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -381,7 +381,7 @@ bool ED_operator_console_active(bContext *C)
static bool ed_object_hidden(const Object *ob)
{
/* if hidden but in edit mode, we still display, can happen with animation */
- return ((ob->restrictflag & OB_RESTRICT_VIEWPORT) && !(ob->mode & OB_MODE_EDIT));
+ return ((ob->visibility_flag & OB_HIDE_VIEWPORT) && !(ob->mode & OB_MODE_EDIT));
}
bool ED_operator_object_active(bContext *C)
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index 7194e78e940..23dd290e13f 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -492,7 +492,7 @@ static bool mask_has_selection(const bContext *C)
}
LISTBASE_FOREACH (MaskLayer *, mask_layer, &mask->masklayers) {
- if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (mask_layer->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) {
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 6538f5709b7..1ec1afe86fc 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -1263,22 +1263,22 @@ static bool collection_flag_poll(bContext *C, bool clear, int flag)
static bool collection_enable_poll(bContext *C)
{
- return collection_flag_poll(C, true, COLLECTION_RESTRICT_VIEWPORT);
+ return collection_flag_poll(C, true, COLLECTION_HIDE_VIEWPORT);
}
static bool collection_disable_poll(bContext *C)
{
- return collection_flag_poll(C, false, COLLECTION_RESTRICT_VIEWPORT);
+ return collection_flag_poll(C, false, COLLECTION_HIDE_VIEWPORT);
}
static bool collection_enable_render_poll(bContext *C)
{
- return collection_flag_poll(C, true, COLLECTION_RESTRICT_RENDER);
+ return collection_flag_poll(C, true, COLLECTION_HIDE_RENDER);
}
static bool collection_disable_render_poll(bContext *C)
{
- return collection_flag_poll(C, false, COLLECTION_RESTRICT_RENDER);
+ return collection_flag_poll(C, false, COLLECTION_HIDE_RENDER);
}
static int collection_flag_exec(bContext *C, wmOperator *op)
@@ -1288,7 +1288,7 @@ static int collection_flag_exec(bContext *C, wmOperator *op)
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
const bool is_render = strstr(op->idname, "render");
const bool clear = strstr(op->idname, "show") || strstr(op->idname, "enable");
- int flag = is_render ? COLLECTION_RESTRICT_RENDER : COLLECTION_RESTRICT_VIEWPORT;
+ int flag = is_render ? COLLECTION_HIDE_RENDER : COLLECTION_HIDE_VIEWPORT;
struct CollectionEditData data = {
.scene = scene,
.space_outliner = space_outliner,
diff --git a/source/blender/editors/transform/transform_convert_mask.c b/source/blender/editors/transform/transform_convert_mask.c
index 54df8270702..1a25cfd1efb 100644
--- a/source/blender/editors/transform/transform_convert_mask.c
+++ b/source/blender/editors/transform/transform_convert_mask.c
@@ -293,7 +293,7 @@ void createTransMaskingData(bContext *C, TransInfo *t)
for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
MaskSpline *spline;
- if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (masklay->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}
@@ -351,7 +351,7 @@ void createTransMaskingData(bContext *C, TransInfo *t)
for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
MaskSpline *spline;
- if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
+ if (masklay->visibility_flag & (MASK_HIDE_VIEW | MASK_HIDE_SELECT)) {
continue;
}