19 #include "RNA_prototypes.h"
61 if (properties && properties->
data) {
105 const float color_default[4] = {1.0f, 1.0f, 1.0f, 1.0f};
197 if (gz->
op_data && ((part_index >= 0) && (part_index < gz->op_data_len))) {
198 return &gz->
op_data[part_index];
247 const float z_axis[3])
251 const float z_global[3] = {0.0f, 0.0f, 1.0f};
265 const float y_axis[3],
266 const float z_axis[3])
279 const float y_axis[3],
280 const float z_axis[3])
294 const float y_axis[3],
295 const float z_axis[3])
360 bool changed =
false;
383 if (use_callback && changed) {
439 scale *=
U.gizmo_size;
442 float matrix_world[4][4];
444 float matrix_basis[4][4];
506 const float(*
const matrix_space)[4] =
params->matrix_space ?
params->matrix_space :
508 const float(*
const matrix_basis)[4] =
params->matrix_basis ?
params->matrix_basis :
510 const float(*
const matrix_offset)[4] =
params->matrix_offset ?
params->matrix_offset :
514 float final_matrix[4][4];
523 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
528 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
531 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
541 float mat_identity[4][4];
546 .matrix_space =
NULL,
547 .matrix_basis =
NULL,
548 .matrix_offset = mat_identity,
558 .matrix_space =
NULL,
559 .matrix_basis =
NULL,
560 .matrix_offset =
NULL,
592 if (*properties ==
NULL) {
602 (*ptr)->data = *properties;
636 bool changed =
false;
641 if (ptype != &RNA_Struct) {
typedef float(TangentPoint)[2]
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_MergeGroup(struct IDProperty *dest, const struct IDProperty *src, bool do_overwrite) ATTR_NONNULL()
void IDP_FreeProperty(struct IDProperty *prop)
void IDP_ClearProperty(struct IDProperty *prop)
struct IDProperty * IDP_CopyProperty(const struct IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void mul_mat3_m4_fl(float R[4][4], float f)
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float v2[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float normalize_v3(float r[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3])
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const float co[3])
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMO_DRAW_OFFSET_SCALE
@ WM_GIZMOGROUPTYPE_SCALE
@ WM_GIZMO_STATE_HIGHLIGHT
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
PropertyType RNA_property_type(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_flag(PropertyRNA *prop)
bool RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier)
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
eWM_GizmoFlagGroupTypeFlag flag
struct wmGizmoGroupType * type
struct wmGizmo * highlight
struct wmGizmoMap::@1182 gzmap_context
Gizmo map runtime context.
struct wmOperatorType * type
wmGizmoPropertyFnFree free_fn
struct wmGizmoProperty::@1185 custom_func
wmGizmoFnSelectRefresh select_refresh
int target_property_defs_len
wmGizmoFnMatrixBasisGet matrix_basis_get
wmGizmoFnPropertyUpdate property_update
struct wmGizmoGroup * parent_gzgroup
float matrix_offset[4][4]
wmGizmoFnModal custom_modal
const struct wmGizmoType * type
struct IDProperty * properties
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
bool wm_gizmo_select_set_ex(wmGizmoMap *gzmap, wmGizmo *gz, bool select, bool use_array, bool use_callback)
void WM_gizmo_set_matrix_offset_location(wmGizmo *gz, const float offset[3])
bool WM_gizmo_context_check_drawstep(const struct bContext *C, eWM_GizmoFlagMapDrawStep step)
static void wm_gizmo_register(wmGizmoGroup *gzgroup, wmGizmo *gz)
void WM_gizmo_set_fn_custom_modal(struct wmGizmo *gz, wmGizmoFnModal fn)
static void gizmo_update_prop_data(wmGizmo *gz)
void WM_gizmo_calc_matrix_final_params(const wmGizmo *gz, const struct WM_GizmoMatrixParams *params, float r_mat[4][4])
PointerRNA * WM_gizmo_operator_set(wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4])
void WM_gizmo_set_line_width(wmGizmo *gz, const float line_width)
bool wm_gizmo_select_and_highlight(bContext *C, wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_get_color_highlight(const wmGizmo *gz, float color_hi[4])
void WM_gizmo_modal_set_from_setup(struct wmGizmoMap *gzmap, struct bContext *C, struct wmGizmo *gz, int part_index, const wmEvent *event)
void WM_gizmo_free(wmGizmo *gz)
void WM_gizmo_set_matrix_offset_rotation_from_yz_axis(wmGizmo *gz, const float y_axis[3], const float z_axis[3])
void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4])
int WM_gizmo_operator_invoke(bContext *C, wmGizmo *gz, wmGizmoOpElem *gzop, const wmEvent *event)
void WM_gizmo_set_matrix_rotation_from_yz_axis(wmGizmo *gz, const float y_axis[3], const float z_axis[3])
void WM_gizmo_properties_create_ptr(PointerRNA *ptr, wmGizmoType *gzt)
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
static void wm_gizmo_set_matrix_rotation_from_yz_axis__internal(float matrix[4][4], const float y_axis[3], const float z_axis[3])
void WM_gizmo_get_color(const wmGizmo *gz, float color[4])
void WM_gizmo_calc_matrix_final_no_offset(const wmGizmo *gz, float r_mat[4][4])
void wm_gizmo_update(wmGizmo *gz, const bContext *C, const bool refresh_map)
bool WM_gizmo_highlight_set(wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_set_matrix_offset_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
static void gizmo_init(wmGizmo *gz)
void WM_gizmo_set_scale(wmGizmo *gz, const float scale)
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
bool WM_gizmo_select_unlink(wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_set_flag(wmGizmo *gz, const int flag, const bool enable)
void WM_gizmo_set_matrix_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
static wmGizmo * wm_gizmo_create(const wmGizmoType *gzt, PointerRNA *properties)
static void wm_gizmo_set_matrix_rotation_from_z_axis__internal(float matrix[4][4], const float z_axis[3])
struct wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
bool WM_gizmo_select_set(wmGizmoMap *gzmap, wmGizmo *gz, bool select)
void WM_gizmo_properties_sanitize(PointerRNA *ptr, const bool no_context)
wmGizmo * WM_gizmo_new(const char *idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
void WM_gizmo_properties_free(PointerRNA *ptr)
void WM_gizmo_properties_reset(wmGizmo *gz)
void WM_gizmo_properties_clear(PointerRNA *ptr)
void wm_gizmo_calculate_scale(wmGizmo *gz, const bContext *C)
bool WM_gizmo_properties_default(PointerRNA *ptr, const bool do_update)
void WM_gizmo_properties_create(PointerRNA *ptr, const char *gtstring)
void WM_gizmo_set_color(wmGizmo *gz, const float color[4])
int wm_gizmo_is_visible(wmGizmo *gz)
void WM_gizmo_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *gtstring)
void WM_gizmo_unlink(ListBase *gizmolist, wmGizmoMap *gzmap, wmGizmo *gz, bContext *C)
int(* wmGizmoFnModal)(struct bContext *, struct wmGizmo *, const struct wmEvent *, eWM_GizmoFlagTweak)
void wm_gizmogroup_gizmo_register(wmGizmoGroup *gzgroup, wmGizmo *gz)
@ WM_GIZMO_IS_VISIBLE_DRAW
@ WM_GIZMO_IS_VISIBLE_UPDATE
void wm_gizmomap_select_array_remove(struct wmGizmoMap *gzmap, wmGizmo *gz)
void wm_gizmomap_select_array_push_back(struct wmGizmoMap *gzmap, wmGizmo *gz)
void wm_gizmomap_modal_set(wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, const wmEvent *event, bool enable)
bool wm_gizmomap_highlight_set(wmGizmoMap *gzmap, const bContext *C, wmGizmo *gz, int part)
bool WM_gizmo_target_property_is_valid(const wmGizmoProperty *gz_prop)
wmGizmoProperty * WM_gizmo_target_property_array(wmGizmo *gz)
const wmGizmoType * WM_gizmotype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)