Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_extra.cc
| Show First 20 Lines • Show All 1,546 Lines • ▼ Show 20 Lines | void OVERLAY_extra_cache_populate(OVERLAY_Data *vedata, Object *ob) | ||||
| OVERLAY_PrivateData *pd = vedata->stl->pd; | OVERLAY_PrivateData *pd = vedata->stl->pd; | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| ViewLayer *view_layer = draw_ctx->view_layer; | ViewLayer *view_layer = draw_ctx->view_layer; | ||||
| Scene *scene = draw_ctx->scene; | Scene *scene = draw_ctx->scene; | ||||
| ModifierData *md = nullptr; | ModifierData *md = nullptr; | ||||
| const bool is_select_mode = DRW_state_is_select(); | const bool is_select_mode = DRW_state_is_select(); | ||||
| const bool is_paint_mode = (draw_ctx->object_mode & | const bool is_paint_mode = (draw_ctx->object_mode & | ||||
| (OB_MODE_ALL_PAINT | OB_MODE_ALL_PAINT_GPENCIL)) != 0; | (OB_MODE_ALL_PAINT | OB_MODE_ALL_PAINT_GPENCIL | | ||||
| OB_MODE_SCULPT_CURVES)) != 0; | |||||
| const bool from_dupli = (ob->base_flag & (BASE_FROM_SET | BASE_FROM_DUPLI)) != 0; | const bool from_dupli = (ob->base_flag & (BASE_FROM_SET | BASE_FROM_DUPLI)) != 0; | ||||
| const bool has_bounds = !ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_EMPTY, OB_SPEAKER, OB_LIGHTPROBE); | const bool has_bounds = !ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_EMPTY, OB_SPEAKER, OB_LIGHTPROBE); | ||||
| const bool has_texspace = has_bounds && | const bool has_texspace = has_bounds && | ||||
| !ELEM(ob->type, OB_EMPTY, OB_LATTICE, OB_ARMATURE, OB_GPENCIL); | !ELEM(ob->type, OB_EMPTY, OB_LATTICE, OB_ARMATURE, OB_GPENCIL); | ||||
| const bool draw_relations = ((pd->v3d_flag & V3D_HIDE_HELPLINES) == 0) && !is_select_mode; | const bool draw_relations = ((pd->v3d_flag & V3D_HIDE_HELPLINES) == 0) && !is_select_mode; | ||||
| const bool draw_obcenters = !is_paint_mode && | const bool draw_obcenters = !is_paint_mode && | ||||
| (pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_ORIGINS) == 0; | (pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_ORIGINS) == 0; | ||||
| ▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines | |||||