Blender
V3.3
|
#include "DNA_brush_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "ED_view3d.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "GPU_shader.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "WM_types.h"
#include "BKE_global.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "view3d_intern.h"
#include "draw_manager.h"
Go to the source code of this file.
Macros | |
#define | CURSOR_VERT(axis_vec, axis, fac) |
#define | CURSOR_EDGE(axis_vec, axis, sign) |
Functions | |
void | DRW_draw_region_info (void) |
static bool | is_cursor_visible (const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer) |
void | DRW_draw_cursor (void) |
void | DRW_draw_cursor_2d (void) |
void | DRW_draw_gizmo_3d (void) |
void | DRW_draw_gizmo_2d (void) |
2D Cursor | |
static bool | is_cursor_visible_2d (const DRWContextState *draw_ctx) |
Generic Cursor | |
void | DRW_draw_cursor_2d_ex (const ARegion *region, const float cursor[2]) |
Contains dynamic drawing using immediate mode
Definition in file draw_view.c.
#define CURSOR_EDGE | ( | axis_vec, | |
axis, | |||
sign | |||
) |
#define CURSOR_VERT | ( | axis_vec, | |
axis, | |||
fac | |||
) |
Definition at line 91 of file draw_view.c.
References BKE_scene_cursor_rot_to_quat(), compare_v4v4(), Scene::cursor, CURSOR_EDGE, DRW_cache_cursor_get(), DRW_context_state_get(), ED_region_pixelspace(), ED_view3d_pixel_size_no_ui_scale(), ED_view3d_project_int_global(), eps, GPU_batch_draw(), GPU_batch_set_shader(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_color_mask(), GPU_COMP_F32, GPU_depth_mask(), GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_projection_get, GPU_matrix_projection_set, GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_PRIM_LINES, GPU_SHADER_2D_FLAT_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_shader_get_builtin_shader(), GPU_vertformat_attr_add(), GPUBatch, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformThemeColor3(), immVertexFormat(), blender::tests::is_aligned(), is_cursor_visible(), View3DCursor::location, mul_qt_v3(), pos, DRWContextState::region, ARegion::regiondata, rotation_between_quats_to_quat(), scene, DRWContextState::scene, TH_VIEW_OVERLAY, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_NEAR, V3D_PROJ_TEST_NOP, DRWContextState::view_layer, and RegionView3D::viewquat.
Referenced by DRW_draw_region_info().
Definition at line 257 of file draw_view.c.
References SpaceImage::cursor, DRW_context_state_get(), DRW_draw_cursor_2d_ex(), GPU_color_mask(), GPU_depth_mask(), GPU_DEPTH_NONE, GPU_depth_test(), is_cursor_visible_2d(), DRWContextState::region, and DRWContextState::space_data.
Referenced by DRW_draw_render_loop_2d_ex().
Definition at line 224 of file draw_view.c.
References DRW_cache_cursor_get(), ED_region_pixelspace(), GPU_batch_draw(), GPU_batch_set_shader(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_projection_get, GPU_matrix_projection_set, GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_SHADER_2D_FLAT_COLOR, GPU_shader_get_builtin_shader(), GPUBatch, UI_view2d_view_to_region(), and ARegion::v2d.
Referenced by DRW_draw_cursor_2d().
Definition at line 287 of file draw_view.c.
References DRW_context_state_get(), DRWContextState::evil_C, ARegion::gizmo_map, GPU_depth_mask(), DRWContextState::region, WM_gizmomap_draw(), and WM_GIZMOMAP_DRAWSTEP_2D.
Referenced by DRW_draw_callbacks_post_scene(), and DRW_draw_render_loop_2d_ex().
Definition at line 276 of file draw_view.c.
References DRW_context_state_get(), DRWContextState::evil_C, ARegion::gizmo_map, DRWContextState::region, WM_gizmomap_draw(), and WM_GIZMOMAP_DRAWSTEP_3D.
Referenced by DRW_draw_callbacks_post_scene().
Definition at line 38 of file draw_view.c.
References DRW_context_state_get(), DRW_draw_cursor(), DRWContextState::evil_C, DRWContextState::region, and view3d_draw_region_info().
Referenced by DRW_draw_callbacks_post_scene().
|
static |
Definition at line 50 of file draw_view.c.
References BKE_object_pose_armature_get(), BKE_paint_get_active(), Paint::brush, ImagePaintSettings::flag, View3DOverlay::flag, View3D::flag2, G, G_TRANSFORM_CURSOR, IMAGEPAINT_PROJECT_LAYER_CLONE, Brush::imagepaint_tool, ToolSettings::imapaint, NULL, OB_MODE_ALL_PAINT, OB_MODE_TEXTURE_PAINT, OB_MODE_WEIGHT_GPENCIL, OB_MODE_WEIGHT_PAINT, DRWContextState::obact, DRWContextState::object_mode, View3D::overlay, PAINT_TOOL_CLONE, scene, Scene::toolsettings, DRWContextState::v3d, V3D_HIDE_OVERLAYS, and V3D_OVERLAY_HIDE_CURSOR.
Referenced by DRW_draw_cursor().
|
static |
Definition at line 195 of file draw_view.c.
References SpaceImageOverlay::flag, if(), SpaceImage::mode, NULL, SpaceImage::overlay, SI_MODE_MASK, SI_MODE_PAINT, SI_MODE_UV, SI_MODE_VIEW, SI_OVERLAY_SHOW_OVERLAYS, DRWContextState::space_data, SPACE_IMAGE, and SpaceInfo::spacetype.
Referenced by DRW_draw_cursor_2d().