113 float cursor_quat[4];
142 #define CURSOR_VERT(axis_vec, axis, fac) \
144 cursor->location[0] + axis_vec[0] * (fac), \
145 cursor->location[1] + axis_vec[1] * (fac), \
146 cursor->location[2] + axis_vec[2] * (fac))
148 #define CURSOR_EDGE(axis_vec, axis, sign) \
150 CURSOR_VERT(axis_vec, axis, sign 1.0f); \
151 CURSOR_VERT(axis_vec, axis, sign 0.25f); \
155 for (
int axis = 0; axis < 3; axis++) {
156 float axis_vec[3] = {0};
157 axis_vec[axis] = scale;
170 float original_proj[4][4];
205 switch (sima->
mode) {
235 float original_proj[4][4];
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_pose_armature_get(struct Object *ob)
struct Paint * BKE_paint_get_active(struct Scene *sce, struct ViewLayer *view_layer)
void BKE_scene_cursor_rot_to_quat(const struct View3DCursor *cursor, float quat[4])
void rotation_between_quats_to_quat(float q[4], const float q1[4], const float q2[4])
void mul_qt_v3(const float q[4], float r[3])
MINLINE bool compare_v4v4(const float a[4], const float b[4], float limit) ATTR_WARN_UNUSED_RESULT
#define OB_MODE_ALL_PAINT
#define IMAGEPAINT_PROJECT_LAYER_CLONE
@ SI_OVERLAY_SHOW_OVERLAYS
@ V3D_OVERLAY_HIDE_CURSOR
#define V3D_HIDE_OVERLAYS
void ED_region_pixelspace(const struct ARegion *region)
@ V3D_PROJ_TEST_CLIP_NEAR
float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const float co[3])
eV3DProjStatus ED_view3d_project_int_global(const struct ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
void GPU_batch_set_shader(GPUBatch *batch, GPUShader *shader)
void GPU_batch_draw(GPUBatch *batch)
void GPU_matrix_pop(void)
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_push(void)
#define GPU_matrix_projection_get(x)
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
struct GPUShader GPUShader
GPUShader * GPU_shader_get_builtin_shader(eGPUBuiltinShader shader)
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_2D_FLAT_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
void GPU_depth_mask(bool depth)
void GPU_color_mask(bool r, bool g, bool b, bool a)
void GPU_depth_test(eGPUDepthTest test)
void UI_view2d_view_to_region(const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
GPUBatch * DRW_cache_cursor_get(bool crosshair_lines)
const DRWContextState * DRW_context_state_get(void)
void DRW_draw_cursor(void)
void DRW_draw_cursor_2d(void)
void DRW_draw_gizmo_2d(void)
void DRW_draw_region_info(void)
void DRW_draw_cursor_2d_ex(const ARegion *region, const float cursor[2])
static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer)
#define CURSOR_EDGE(axis_vec, axis, sign)
void DRW_draw_gizmo_3d(void)
static bool is_cursor_visible_2d(const DRWContextState *draw_ctx)
static bool is_aligned(void *ptr, uint alignment)
struct wmGizmoMap * gizmo_map
struct SpaceLink * space_data
const struct bContext * evil_C
struct ViewLayer * view_layer
struct ToolSettings * toolsettings
SpaceImageOverlay overlay
void view3d_draw_region_info(const bContext *C, ARegion *region)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)