Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_engine.c
| Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Lines | static void OVERLAY_cache_populate(void *vedata, Object *ob) | ||||
| const bool instance_parent_in_edit_mode = is_instance ? | const bool instance_parent_in_edit_mode = is_instance ? | ||||
| overlay_object_is_edit_mode( | overlay_object_is_edit_mode( | ||||
| pd, DRW_object_get_dupli_parent(ob)) : | pd, DRW_object_get_dupli_parent(ob)) : | ||||
| false; | false; | ||||
| const bool in_particle_edit_mode = (ob->mode == OB_MODE_PARTICLE_EDIT) && | const bool in_particle_edit_mode = (ob->mode == OB_MODE_PARTICLE_EDIT) && | ||||
| (pd->ctx_mode == CTX_MODE_PARTICLE); | (pd->ctx_mode == CTX_MODE_PARTICLE); | ||||
| const bool in_paint_mode = (ob == draw_ctx->obact) && | const bool in_paint_mode = (ob == draw_ctx->obact) && | ||||
| (draw_ctx->object_mode & OB_MODE_ALL_PAINT); | (draw_ctx->object_mode & OB_MODE_ALL_PAINT); | ||||
| const bool in_sculpt_curve_mode = (ob == draw_ctx->obact) && | |||||
| (draw_ctx->object_mode & OB_MODE_SCULPT_CURVES); | |||||
| const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != NULL) && | const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != NULL) && | ||||
| (ob->sculpt->mode_type == OB_MODE_SCULPT); | (ob->sculpt->mode_type == OB_MODE_SCULPT); | ||||
| const bool in_curves_sculpt_mode = (ob == draw_ctx->obact) && | const bool in_curves_sculpt_mode = (ob == draw_ctx->obact) && | ||||
| (ob->mode == OB_MODE_SCULPT_CURVES); | (ob->mode == OB_MODE_SCULPT_CURVES); | ||||
| const bool has_surface = ELEM(ob->type, | const bool has_surface = ELEM(ob->type, | ||||
| OB_MESH, | OB_MESH, | ||||
| OB_CURVES_LEGACY, | OB_CURVES_LEGACY, | ||||
| OB_SURF, | OB_SURF, | ||||
| OB_MBALL, | OB_MBALL, | ||||
| OB_FONT, | OB_FONT, | ||||
| OB_GPENCIL, | OB_GPENCIL, | ||||
| OB_CURVES, | OB_CURVES, | ||||
| OB_POINTCLOUD, | OB_POINTCLOUD, | ||||
| OB_VOLUME); | OB_VOLUME); | ||||
| const bool draw_surface = (ob->dt >= OB_WIRE) && (renderable || (ob->dt == OB_WIRE)); | const bool draw_surface = (ob->dt >= OB_WIRE) && (renderable || (ob->dt == OB_WIRE)); | ||||
| const bool draw_facing = draw_surface && (pd->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) && | const bool draw_facing = draw_surface && (pd->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) && | ||||
| !is_select; | !is_select; | ||||
| const bool draw_fade = draw_surface && (pd->overlay.flag & V3D_OVERLAY_FADE_INACTIVE) && | const bool draw_fade = draw_surface && (pd->overlay.flag & V3D_OVERLAY_FADE_INACTIVE) && | ||||
| overlay_should_fade_object(ob, draw_ctx->obact); | overlay_should_fade_object(ob, draw_ctx->obact); | ||||
| const bool draw_mode_transfer = draw_surface; | const bool draw_mode_transfer = draw_surface; | ||||
| const bool draw_bones = (pd->overlay.flag & V3D_OVERLAY_HIDE_BONES) == 0; | const bool draw_bones = (pd->overlay.flag & V3D_OVERLAY_HIDE_BONES) == 0; | ||||
| const bool draw_wires = draw_surface && has_surface && | const bool draw_wires = draw_surface && has_surface && | ||||
| (pd->wireframe_mode || !pd->hide_overlays); | (pd->wireframe_mode || !pd->hide_overlays); | ||||
| const bool draw_outlines = !in_edit_mode && !in_paint_mode && renderable && has_surface && | const bool draw_outlines = !in_edit_mode && !in_paint_mode && !in_sculpt_curve_mode && | ||||
| !instance_parent_in_edit_mode && | renderable && has_surface && !instance_parent_in_edit_mode && | ||||
| (pd->v3d_flag & V3D_SELECT_OUTLINE) && | (pd->v3d_flag & V3D_SELECT_OUTLINE) && | ||||
| (ob->base_flag & BASE_SELECTED); | (ob->base_flag & BASE_SELECTED); | ||||
| const bool draw_bone_selection = (ob->type == OB_MESH) && pd->armature.do_pose_fade_geom && | const bool draw_bone_selection = (ob->type == OB_MESH) && pd->armature.do_pose_fade_geom && | ||||
| !is_select; | !is_select; | ||||
| const bool draw_edit_weights = in_edit_mode && (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_WEIGHT); | const bool draw_edit_weights = in_edit_mode && (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_WEIGHT); | ||||
| const bool draw_extras = | const bool draw_extras = | ||||
| (!pd->hide_overlays) && | (!pd->hide_overlays) && | ||||
| (((pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_XTRAS) == 0) || | (((pd->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_XTRAS) == 0) || | ||||
| ▲ Show 20 Lines • Show All 401 Lines • Show Last 20 Lines | |||||