Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_engine.c
| Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | if (pd->space_type == SPACE_IMAGE) { | ||||
| return; | return; | ||||
| } | } | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| const bool is_select = DRW_state_is_select(); | const bool is_select = DRW_state_is_select(); | ||||
| const bool renderable = DRW_object_is_renderable(ob); | const bool renderable = DRW_object_is_renderable(ob); | ||||
| const bool in_pose_mode = ob->type == OB_ARMATURE && OVERLAY_armature_is_pose_mode(ob, draw_ctx); | const bool in_pose_mode = ob->type == OB_ARMATURE && OVERLAY_armature_is_pose_mode(ob, draw_ctx); | ||||
| const bool in_edit_mode = overlay_object_is_edit_mode(pd, ob); | const bool in_edit_mode = overlay_object_is_edit_mode(pd, ob); | ||||
| const bool is_instance = (ob->base_flag & BASE_FROM_DUPLI); | |||||
| const bool instance_parent_in_edit_mode = is_instance ? | |||||
| overlay_object_is_edit_mode( | |||||
| pd, DRW_object_get_dupli_parent(ob)) : | |||||
| 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_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 has_surface = ELEM(ob->type, | const bool has_surface = ELEM(ob->type, | ||||
| OB_MESH, | OB_MESH, | ||||
| Show All 10 Lines | 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 && 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 380 Lines • Show Last 20 Lines | |||||