Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_draw.c
| Show First 20 Lines • Show All 600 Lines • ▼ Show 20 Lines | if (te->ys + 2 * UI_UNIT_Y >= ar->v2d.cur.ymin && te->ys <= ar->v2d.cur.ymax) { | ||||
| bt = uiDefIconButBitS( | bt = uiDefIconButBitS( | ||||
| block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_OFF, | block, UI_BTYPE_ICON_TOGGLE_N, VIEW_LAYER_RENDER, 0, ICON_RESTRICT_RENDER_OFF, | ||||
| (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), te->ys, UI_UNIT_X, | (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), te->ys, UI_UNIT_X, | ||||
| UI_UNIT_Y, &layer->flag, 0, 0, 0, 0, TIP_("Use view layer for rendering")); | UI_UNIT_Y, &layer->flag, 0, 0, 0, 0, TIP_("Use view layer for rendering")); | ||||
| UI_but_func_set(bt, restrictbutton_r_lay_cb, tselem->id, NULL); | UI_but_func_set(bt, restrictbutton_r_lay_cb, tselem->id, NULL); | ||||
| UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); | UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); | ||||
| UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); | UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE); | ||||
| } | } | ||||
| else if ((tselem->type == 0 && te->idcode == ID_OB) && | |||||
| (te->flag & TE_CHILDREN_NOT_IN_COLLECTION)) | |||||
| { | |||||
| /* Don't show restrict columns for children that are not directly inside the collection. */ | |||||
| } | |||||
| else if (tselem->type == 0 && te->idcode == ID_OB) { | else if (tselem->type == 0 && te->idcode == ID_OB) { | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| Object *ob = (Object *)tselem->id; | Object *ob = (Object *)tselem->id; | ||||
| RNA_pointer_create(&ob->id, &RNA_Object, ob, &ptr); | RNA_pointer_create(&ob->id, &RNA_Object, ob, &ptr); | ||||
| Base *base = BKE_view_layer_base_find(view_layer, ob); | Base *base = BKE_view_layer_base_find(view_layer, ob); | ||||
| if (base) { | if (base) { | ||||
| int icon = ICON_RESTRICT_VIEW_ON; | int icon = ICON_RESTRICT_VIEW_ON; | ||||
| ▲ Show 20 Lines • Show All 1,756 Lines • Show Last 20 Lines | |||||