32 #include "RNA_prototypes.h"
37 #include "../gizmo_library_intern.h"
49 if (gz_prop_snap->
prop) {
67 snap_state->
flag |= flag;
73 snap_state->
flag &= ~flag;
79 return (snap_state->
flag & flag) != 0;
141 for (
bScreen *screen =
G_MAIN->screens.first; screen; screen = screen->id.next) {
151 if (gz->properties == properties) {
318 gzt->
idname =
"GIZMO_GT_snap_3d";
346 "snap_elements_force",
363 "Point that defines the location of the perpendicular snap",
377 "Snap Point Location",
402 "Array index of face, edge and vert snapped",
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void BLI_kdtree_nd_() free(KDTree *tree)
#define LISTBASE_FOREACH(type, var, list)
void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_int(int r[3], const int a[3])
@ SCE_SNAP_MODE_FACE_RAYCAST
void ED_view3d_cursor_snap_prevpoint_set(V3DSnapCursorState *state, const float prev_point[3])
V3DSnapCursorData * ED_view3d_cursor_snap_data_get(void)
void ED_view3d_cursor_snap_data_update(V3DSnapCursorState *state, const struct bContext *C, int x, int y)
struct SnapObjectContext * ED_view3d_cursor_snap_context_ensure(struct Scene *scene)
void ED_view3d_cursor_snap_deactive(V3DSnapCursorState *state)
V3DSnapCursorState * ED_view3d_cursor_snap_active(void)
V3DSnapCursorState * ED_view3d_cursor_snap_state_get(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_enum_funcs_runtime(PropertyRNA *prop, EnumPropertyGetFunc getfunc, EnumPropertySetFunc setfunc, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_float_translation(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_int_array_funcs_runtime(PropertyRNA *prop, IntArrayPropertyGetFunc getfunc, IntArrayPropertySetFunc setfunc, IntPropertyRangeFunc rangefunc)
void RNA_def_property_float_array_funcs_runtime(PropertyRNA *prop, FloatArrayPropertyGetFunc getfunc, FloatArrayPropertySetFunc setfunc, FloatPropertyRangeFunc rangefunc)
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
const EnumPropertyItem rna_enum_snap_element_items[]
bool ED_gizmotypes_snap_3d_invert_snap_get(struct wmGizmo *UNUSED(gz))
static void gizmo_snap_rna_snap_elements_force_set_fn(struct PointerRNA *ptr, struct PropertyRNA *UNUSED(prop), int value)
void ED_gizmotypes_snap_3d_flag_set(struct wmGizmo *gz, int flag)
static SnapGizmo3D * gizmo_snap_rna_find_operator(PointerRNA *ptr)
static V3DSnapCursorState * gizmo_snap_state_from_rna_get(struct PointerRNA *ptr)
bool ED_gizmotypes_snap_3d_flag_test(struct wmGizmo *gz, int flag)
static void gizmo_snap_rna_normal_get_fn(struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), float *values)
static int gizmo_snap_rna_snap_elements_force_get_fn(struct PointerRNA *ptr, struct PropertyRNA *UNUSED(prop))
static int snap_gizmo_test_select(bContext *C, wmGizmo *gz, const int mval[2])
bool ED_gizmotypes_snap_3d_is_enabled(const wmGizmo *UNUSED(gz))
SnapObjectContext * ED_gizmotypes_snap_3d_context_ensure(Scene *scene, wmGizmo *UNUSED(gz))
static int snap_gizmo_invoke(bContext *UNUSED(C), wmGizmo *UNUSED(gz), const wmEvent *UNUSED(event))
static int snap_gizmo_modal(bContext *UNUSED(C), wmGizmo *UNUSED(gz), const wmEvent *UNUSED(event), eWM_GizmoFlagTweak UNUSED(tweak_flag))
void ED_gizmotypes_snap_3d_data_get(const struct bContext *C, wmGizmo *gz, float r_loc[3], float r_nor[3], int r_elem_index[3], eSnapMode *r_snap_elem)
void ED_gizmotypes_snap_3d_flag_clear(struct wmGizmo *gz, int flag)
static void snap_gizmo_snap_elements_update(SnapGizmo3D *snap_gizmo)
static void gizmo_snap_rna_location_get_fn(struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), float *values)
static void snap_gizmo_free(wmGizmo *gz)
struct SnapGizmo3D SnapGizmo3D
static void gizmo_snap_rna_prevpoint_set_fn(struct PointerRNA *ptr, struct PropertyRNA *UNUSED(prop), const float *values)
void ED_gizmotypes_snap_3d(void)
static void gizmo_snap_rna_snap_elem_index_get_fn(struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), int *values)
static void snap_gizmo_setup(wmGizmo *gz)
static void gizmo_snap_rna_prevpoint_get_fn(struct PointerRNA *ptr, struct PropertyRNA *UNUSED(prop), float *values)
static void gizmo_snap_rna_location_set_fn(struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), const float *values)
static void snap_gizmo_draw(const bContext *UNUSED(C), wmGizmo *UNUSED(gz))
static void GIZMO_GT_snap_3d(wmGizmoType *gzt)
V3DSnapCursorState * snap_state
struct wmGizmoGroupType * gzgrp_type
eSnapMode snap_elem_force
struct wmGizmoGroupType * type
wmGizmoFnTestSelect test_select
struct wmGizmoGroup * parent_gzgroup
struct wmWindow * winactive
struct wmEvent * eventstate
const ListBase * WM_gizmomap_group_list(wmGizmoMap *gzmap)
wmGizmoProperty * WM_gizmo_target_property_find(wmGizmo *gz, const char *idname)
void WM_gizmotype_target_property_def(wmGizmoType *gzt, const char *idname, int data_type, int array_length)
void WM_gizmotype_append(void(*gtfunc)(struct wmGizmoType *))