135 if (is_aligned ==
false) {
138 is_aligned = tquat[0] -
eps < -1.0f;
143 if (is_aligned ==
false) {
151#define CURSOR_VERT(axis_vec, axis, fac) \
153 cursor->location[0] + axis_vec[0] * (fac), \
154 cursor->location[1] + axis_vec[1] * (fac), \
155 cursor->location[2] + axis_vec[2] * (fac))
157#define CURSOR_EDGE(axis_vec, axis, sign) \
159 CURSOR_VERT(axis_vec, axis, sign 1.0f); \
160 CURSOR_VERT(axis_vec, axis, sign 0.25f); \
164 for (
int axis = 0; axis < 3; axis++) {
165 float axis_vec[3] = {0};
166 axis_vec[axis] = scale;
179 float original_proj[4][4];
205 if (space_data ==
nullptr) {
212 switch (sima->
mode) {
242 float original_proj[4][4];
General operations, lookup, etc. for blender objects.
Object * BKE_object_pose_armature_get(Object *ob)
Paint * BKE_paint_get_active(Scene *sce, ViewLayer *view_layer)
const Brush * BKE_paint_brush_for_read(const Paint *paint)
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 v1[4], const float v2[4], float limit) ATTR_WARN_UNUSED_RESULT
@ IMAGE_PAINT_BRUSH_TYPE_CLONE
#define OB_MODE_ALL_PAINT
@ OB_MODE_WEIGHT_GREASE_PENCIL
@ IMAGEPAINT_PROJECT_LAYER_CLONE
@ SI_OVERLAY_SHOW_OVERLAYS
@ V3D_OVERLAY_HIDE_CURSOR
void ED_region_pixelspace(const ARegion *region)
@ V3D_PROJ_TEST_CLIP_NEAR
float ED_view3d_pixel_size_no_ui_scale(const RegionView3D *rv3d, const float co[3])
eV3DProjStatus ED_view3d_project_int_global(const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
void GPU_batch_set_shader(blender::gpu::Batch *batch, GPUShader *shader)
void GPU_batch_draw(blender::gpu::Batch *batch)
void GPU_debug_group_end()
void GPU_debug_group_begin(const char *name)
void GPU_matrix_scale_2f(float x, float y)
#define GPU_matrix_projection_get(x)
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
GPUShader * GPU_shader_get_builtin_shader(eGPUBuiltinShader shader)
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_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 View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
struct GPUShader GPUShader
blender::gpu::Batch * DRW_cache_cursor_get(bool crosshair_lines)
const DRWContextState * DRW_context_state_get()
void DRW_draw_region_info()
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)
void DRW_draw_cursor_2d()
#define CURSOR_EDGE(axis_vec, axis, sign)
static bool is_cursor_visible_2d(const DRWContextState *draw_ctx)
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)