Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw_legacy.c
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "BLF_api.h" | #include "BLF_api.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "ED_armature.h" | #include "ED_armature.h" | ||||
| #include "ED_keyframing.h" | #include "ED_keyframing.h" | ||||
| #include "ED_gpencil.h" | #include "ED_gpencil.h" | ||||
| #include "ED_mesh.h" | |||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_space_api.h" | #include "ED_space_api.h" | ||||
| #include "ED_screen_types.h" | #include "ED_screen_types.h" | ||||
| #include "ED_transform.h" | #include "ED_transform.h" | ||||
| #include "ED_view3d.h" | #include "ED_view3d.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_interface_icons.h" | #include "UI_interface_icons.h" | ||||
| ▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | if (v3d->shading.type > OB_WIRE) { | ||||
| v3d->zbuf = true; | v3d->zbuf = true; | ||||
| } | } | ||||
| #endif | #endif | ||||
| G.f |= G_FLAG_BACKBUFSEL; | G.f |= G_FLAG_BACKBUFSEL; | ||||
| if (obact_eval && ((obact_eval->base_flag & BASE_VISIBLE) != 0)) { | if (obact_eval && ((obact_eval->base_flag & BASE_VISIBLE) != 0)) { | ||||
| DRW_framebuffer_select_id_setup(ar, true); | DRW_framebuffer_select_id_setup(ar, true); | ||||
| draw_object_select_id(depsgraph, scene_eval, v3d, rv3d, obact_eval, select_mode); | DRW_draw_select_id_object(depsgraph, | ||||
| scene, | |||||
| v3d, | |||||
| rv3d, | |||||
| obact_eval, | |||||
| select_mode, | |||||
| false, | |||||
| 0, | |||||
| &bm_solidoffs, | |||||
| &bm_wireoffs, | |||||
| &bm_vertoffs); | |||||
| DRW_framebuffer_select_id_release(ar); | DRW_framebuffer_select_id_release(ar); | ||||
| } | } | ||||
| /* TODO: Create a flag in `DRW_manager` because the drawing is no longer | /* TODO: Create a flag in `DRW_manager` because the drawing is no longer | ||||
| * made on the backbuffer in this case. */ | * made on the backbuffer in this case. */ | ||||
| v3d->flag &= ~V3D_INVALID_BACKBUF; | v3d->flag &= ~V3D_INVALID_BACKBUF; | ||||
| G.f &= ~G_FLAG_BACKBUFSEL; | G.f &= ~G_FLAG_BACKBUFSEL; | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if (vc->v3d->flag & V3D_INVALID_BACKBUF) { | ||||
| } | } | ||||
| vc->v3d->flag &= ~V3D_INVALID_BACKBUF; | vc->v3d->flag &= ~V3D_INVALID_BACKBUF; | ||||
| } | } | ||||
| } | } | ||||
| uint *ED_view3d_select_id_read_rect(ViewContext *vc, const rcti *clip, uint *r_buf_len) | uint *ED_view3d_select_id_read_rect(ViewContext *vc, const rcti *clip, uint *r_buf_len) | ||||
| { | { | ||||
| ED_view3d_select_id_validate(vc); | |||||
| uint width = BLI_rcti_size_x(clip); | uint width = BLI_rcti_size_x(clip); | ||||
| uint height = BLI_rcti_size_y(clip); | uint height = BLI_rcti_size_y(clip); | ||||
| uint buf_len = width * height; | uint buf_len = width * height; | ||||
| uint *buf = MEM_mallocN(buf_len * sizeof(*buf), __func__); | uint *buf = MEM_mallocN(buf_len * sizeof(*buf), __func__); | ||||
| DRW_framebuffer_select_id_read(clip, buf); | DRW_framebuffer_select_id_read(clip, buf); | ||||
| if (r_buf_len) { | if (r_buf_len) { | ||||
| ▲ Show 20 Lines • Show All 799 Lines • Show Last 20 Lines | |||||