diff options
Diffstat (limited to 'source/blender/editors')
10 files changed, 49 insertions, 50 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 7e3c85268db..a228d819286 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1823,7 +1823,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, } /* outliner restrict-flag */ - if (ob->restrictflag & OB_RESTRICT_INSTANCE) { + if (ob->restrictflag & OB_RESTRICT_VIEWPORT) { continue; } } @@ -3022,7 +3022,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m } /* outliner restrict-flag */ - if (ob->restrictflag & OB_RESTRICT_INSTANCE) { + if (ob->restrictflag & OB_RESTRICT_VIEWPORT) { return false; } } diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 6f6dd12c3ec..1f825c0bb31 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1992,9 +1992,9 @@ static int mask_hide_view_clear_exec(bContext *C, wmOperator *op) for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { - if (masklay->restrictflag & OB_RESTRICT_INSTANCE) { + if (masklay->restrictflag & OB_RESTRICT_VIEWPORT) { ED_mask_layer_select_set(masklay, select); - masklay->restrictflag &= ~OB_RESTRICT_INSTANCE; + masklay->restrictflag &= ~OB_RESTRICT_VIEWPORT; changed = true; } } @@ -2045,7 +2045,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) if (ED_mask_layer_select_check(masklay)) { ED_mask_layer_select_set(masklay, false); - masklay->restrictflag |= OB_RESTRICT_INSTANCE; + masklay->restrictflag |= OB_RESTRICT_VIEWPORT; changed = true; if (masklay == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); @@ -2054,7 +2054,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) } else { if (!ED_mask_layer_select_check(masklay)) { - masklay->restrictflag |= OB_RESTRICT_INSTANCE; + masklay->restrictflag |= OB_RESTRICT_VIEWPORT; changed = true; if (masklay == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index ef7c1d35609..07c0d42c81a 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2475,7 +2475,7 @@ static int add_named_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - basen->object->restrictflag &= ~OB_RESTRICT_INSTANCE; + basen->object->restrictflag &= ~OB_RESTRICT_VIEWPORT; if (event) { ARegion *ar = CTX_wm_region(C); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 279eadbe810..9fba0d89c4a 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -314,7 +314,7 @@ void ED_collection_hide_menu_draw(const bContext *C, uiLayout *layout) continue; } - if (lc->collection->flag & COLLECTION_RESTRICT_INSTANCE) { + if (lc->collection->flag & COLLECTION_RESTRICT_VIEWPORT) { continue; } @@ -722,7 +722,7 @@ static bool editmode_toggle_poll(bContext *C) } /* if hidden but in edit mode, we still display */ - if ((ob->restrictflag & OB_RESTRICT_INSTANCE) && !(ob->mode & OB_MODE_EDIT)) { + if ((ob->restrictflag & OB_RESTRICT_VIEWPORT) && !(ob->mode & OB_MODE_EDIT)) { return 0; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index e94b07e3ed8..af90bbc9975 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -342,7 +342,7 @@ bool ED_operator_console_active(bContext *C) static bool ed_object_hidden(Object *ob) { /* if hidden but in edit mode, we still display, can happen with animation */ - return ((ob->restrictflag & OB_RESTRICT_INSTANCE) && !(ob->mode & OB_MODE_EDIT)); + return ((ob->restrictflag & OB_RESTRICT_VIEWPORT) && !(ob->mode & OB_MODE_EDIT)); } bool ED_operator_object_active(bContext *C) diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index 18723961a52..21e54a29fb9 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -965,8 +965,8 @@ static int collection_isolate_exec(bContext *C, wmOperator *op) LayerCollection *lc_master = view_layer->layer_collections.first; for (LayerCollection *lc_iter = lc_master->layer_collections.first; lc_iter; lc_iter = lc_iter->next) { - lc_iter->flag |= LAYER_COLLECTION_RESTRICT_VIEW; - layer_collection_flag_recursive_set(lc_iter, LAYER_COLLECTION_RESTRICT_VIEW); + lc_iter->flag |= LAYER_COLLECTION_HIDE; + layer_collection_flag_recursive_set(lc_iter, LAYER_COLLECTION_HIDE); } } @@ -1023,12 +1023,12 @@ void OUTLINER_OT_collection_isolate(wmOperatorType *ot) static bool collection_show_poll(bContext *C) { - return collections_view_layer_poll(C, true, LAYER_COLLECTION_RESTRICT_VIEW); + return collections_view_layer_poll(C, true, LAYER_COLLECTION_HIDE); } static bool collection_hide_poll(bContext *C) { - return collections_view_layer_poll(C, false, LAYER_COLLECTION_RESTRICT_VIEW); + return collections_view_layer_poll(C, false, LAYER_COLLECTION_HIDE); } static bool collection_inside_poll(bContext *C) @@ -1163,12 +1163,12 @@ 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_INSTANCE); + return collection_flag_poll(C, true, COLLECTION_RESTRICT_VIEWPORT); } static bool collection_disable_poll(bContext *C) { - return collection_flag_poll(C, false, COLLECTION_RESTRICT_INSTANCE); + return collection_flag_poll(C, false, COLLECTION_RESTRICT_VIEWPORT); } static bool collection_enable_render_poll(bContext *C) @@ -1188,7 +1188,7 @@ static int collection_flag_exec(bContext *C, wmOperator *op) SpaceOutliner *soops = 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_INSTANCE; + int flag = is_render ? COLLECTION_RESTRICT_RENDER : COLLECTION_RESTRICT_VIEWPORT; struct CollectionEditData data = { .scene = scene, .soops = soops, @@ -1215,7 +1215,7 @@ static int collection_flag_exec(bContext *C, wmOperator *op) /* Make sure (at least for this view layer) the collection is visible. */ if (clear && !is_render) { - layer_collection->flag &= ~LAYER_COLLECTION_RESTRICT_VIEW; + layer_collection->flag &= ~LAYER_COLLECTION_HIDE; } } BLI_gset_free(data.collections_to_edit, NULL); @@ -1408,8 +1408,8 @@ static int outliner_unhide_all_exec(bContext *C, wmOperator *UNUSED(op)) LayerCollection *lc_master = view_layer->layer_collections.first; for (LayerCollection *lc_iter = lc_master->layer_collections.first; lc_iter; lc_iter = lc_iter->next) { - lc_iter->flag &= ~LAYER_COLLECTION_RESTRICT_VIEW; - layer_collection_flag_recursive_set(lc_iter, LAYER_COLLECTION_RESTRICT_VIEW); + lc_iter->flag &= ~LAYER_COLLECTION_HIDE; + layer_collection_flag_recursive_set(lc_iter, LAYER_COLLECTION_HIDE); } /* Unhide all objects. */ diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 24141978f57..506934b9289 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -287,12 +287,12 @@ static void hidebutton_base_flag_cb(bContext *C, void *poin, void *poin2) if (do_disable) { if (!is_linked) { - ob->restrictflag |= OB_RESTRICT_INSTANCE; + ob->restrictflag |= OB_RESTRICT_VIEWPORT; depsgraph_changed = true; } } else if (do_isolate) { - depsgraph_changed = (!is_linked) && ((ob->restrictflag & OB_RESTRICT_INSTANCE) != 0); + depsgraph_changed = (!is_linked) && ((ob->restrictflag & OB_RESTRICT_VIEWPORT) != 0); if (!extend) { /* Make only one base visible. */ @@ -308,12 +308,12 @@ static void hidebutton_base_flag_cb(bContext *C, void *poin, void *poin2) } if (!is_linked) { - ob->restrictflag &= ~OB_RESTRICT_INSTANCE; + ob->restrictflag &= ~OB_RESTRICT_VIEWPORT; } } - else if (ob->restrictflag & OB_RESTRICT_INSTANCE) { + else if (ob->restrictflag & OB_RESTRICT_VIEWPORT) { if (!is_linked) { - ob->restrictflag &= ~OB_RESTRICT_INSTANCE; + ob->restrictflag &= ~OB_RESTRICT_VIEWPORT; base->flag &= ~BASE_HIDDEN; } depsgraph_changed = true; @@ -889,8 +889,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, struct { int select; + int hide; int viewport; - int instance; int render; int indirect_only; int holdout; @@ -909,13 +909,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, if (soops->show_restrict_flags & SO_RESTRICT_RENDER) { restrict_offsets.render = (++restrict_column_offset) * UI_UNIT_X + V2D_SCROLL_WIDTH; } - if (soops->show_restrict_flags & SO_RESTRICT_INSTANCE) { - restrict_offsets.instance = (++restrict_column_offset) * UI_UNIT_X + V2D_SCROLL_WIDTH; - } if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { restrict_offsets.viewport = (++restrict_column_offset) * UI_UNIT_X + V2D_SCROLL_WIDTH; } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { + restrict_offsets.hide = (++restrict_column_offset) * UI_UNIT_X + V2D_SCROLL_WIDTH; + } + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { restrict_offsets.select = (++restrict_column_offset) * UI_UNIT_X + V2D_SCROLL_WIDTH; } BLI_assert((restrict_column_offset * UI_UNIT_X + V2D_SCROLL_WIDTH) == @@ -961,7 +961,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Object *ob = (Object *)tselem->id; RNA_id_pointer_create(&ob->id, &ptr); - if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { + if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { Base *base = (te->directdata) ? (Base *)te->directdata : BKE_view_layer_base_find(view_layer, ob); if (base) { @@ -971,7 +971,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_BTYPE_ICON_TOGGLE, 0, 0, - (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), + (int)(ar->v2d.cur.xmax - restrict_offsets.hide), te->ys, UI_UNIT_X, UI_UNIT_Y, @@ -990,7 +990,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_BTYPE_ICON_TOGGLE, 0, 0, - (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), + (int)(ar->v2d.cur.xmax - restrict_offsets.hide), te->ys, UI_UNIT_X, UI_UNIT_Y, @@ -1006,7 +1006,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, } } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, @@ -1026,12 +1026,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); } - if (soops->show_restrict_flags & SO_RESTRICT_INSTANCE) { + if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, 0, - (int)(ar->v2d.cur.xmax - restrict_offsets.instance), + (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), te->ys, UI_UNIT_X, UI_UNIT_Y, @@ -1138,7 +1138,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { bt = uiDefIconButBitI(block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, @@ -1183,7 +1183,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { bt = uiDefIconButBitI(block, UI_BTYPE_ICON_TOGGLE, BONE_UNSELECTABLE, @@ -1229,7 +1229,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { bt = uiDefIconButBitS( block, UI_BTYPE_ICON_TOGGLE, @@ -1266,12 +1266,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, RNA_pointer_create( &scene->id, &RNA_LayerCollection, layer_collection, &layer_collection_ptr); - if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { + if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, 0, - (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), + (int)(ar->v2d.cur.xmax - restrict_offsets.hide), te->ys, UI_UNIT_X, UI_UNIT_Y, @@ -1347,12 +1347,12 @@ static void outliner_draw_restrictbuts(uiBlock *block, } } - if (soops->show_restrict_flags & SO_RESTRICT_INSTANCE) { + if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, 0, - (int)(ar->v2d.cur.xmax - restrict_offsets.instance), + (int)(ar->v2d.cur.xmax - restrict_offsets.viewport), te->ys, UI_UNIT_X, UI_UNIT_Y, @@ -1413,7 +1413,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); } - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { bt = uiDefIconButR_prop(block, UI_BTYPE_ICON_TOGGLE, 0, diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 80b717aeb43..90180c4ea47 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1025,8 +1025,8 @@ int common_restrict_check(bContext *C, Object *ob) Object *obedit = CTX_data_edit_object(C); if (obedit && obedit == ob) { /* found object is hidden, reset */ - if (ob->restrictflag & OB_RESTRICT_INSTANCE) { - ob->restrictflag &= ~OB_RESTRICT_INSTANCE; + if (ob->restrictflag & OB_RESTRICT_VIEWPORT) { + ob->restrictflag &= ~OB_RESTRICT_VIEWPORT; } /* found object is unselectable, reset */ if (ob->restrictflag & OB_RESTRICT_SELECT) { diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 4d3272eab20..9f99c658bd9 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -283,13 +283,13 @@ float outliner_restrict_columns_width(const SpaceOutliner *soops) } ATTR_FALLTHROUGH; case SO_SCENES: - if (soops->show_restrict_flags & SO_RESTRICT_SELECTABLE) { + if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { num_columns++; } if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { num_columns++; } - if (soops->show_restrict_flags & SO_RESTRICT_INSTANCE) { + if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { num_columns++; } if (soops->show_restrict_flags & SO_RESTRICT_RENDER) { diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 71290fc9fe0..e048814df9b 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -302,8 +302,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED( soutliner = MEM_callocN(sizeof(SpaceOutliner), "initoutliner"); soutliner->spacetype = SPACE_OUTLINER; soutliner->filter_id_type = ID_GR; - soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECTABLE | - SO_RESTRICT_VIEWPORT; + soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECT | SO_RESTRICT_VIEWPORT; /* header */ ar = MEM_callocN(sizeof(ARegion), "header for outliner"); |