Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_view.c
| Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | GPUBatch *DRW_draw_background_clipping_batch_from_rv3d(const RegionView3D *rv3d) | ||||
| return GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, el, GPU_BATCH_OWNS_VBO | GPU_BATCH_OWNS_INDEX); | return GPU_batch_create_ex(GPU_PRIM_TRIS, vbo, el, GPU_BATCH_OWNS_VBO | GPU_BATCH_OWNS_INDEX); | ||||
| } | } | ||||
| /* **************************** 3D Cursor ******************************** */ | /* **************************** 3D Cursor ******************************** */ | ||||
| static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer) | static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer) | ||||
| { | { | ||||
| View3D *v3d = draw_ctx->v3d; | View3D *v3d = draw_ctx->v3d; | ||||
| if (!v3d) { | |||||
| /* TODO: Add support for 2d cursor for image editor. */ | |||||
| return false; | |||||
| } | |||||
| if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || (v3d->overlay.flag & V3D_OVERLAY_HIDE_CURSOR)) { | if ((v3d->flag2 & V3D_HIDE_OVERLAYS) || (v3d->overlay.flag & V3D_OVERLAY_HIDE_CURSOR)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* don't draw cursor in paint modes, but with a few exceptions */ | /* don't draw cursor in paint modes, but with a few exceptions */ | ||||
| if (draw_ctx->object_mode & OB_MODE_ALL_PAINT) { | if (draw_ctx->object_mode & OB_MODE_ALL_PAINT) { | ||||
| /* exception: object is in weight paint and has deforming armature in pose mode */ | /* exception: object is in weight paint and has deforming armature in pose mode */ | ||||
| if (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) { | if (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) { | ||||
| ▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines | |||||