19#include "RNA_prototypes.hh"
60 gz->
ptr = MEM_new<PointerRNA>(
"wmGizmoPtrRNA");
61 if (properties && properties->
data) {
108 const float color_default[4] = {1.0f, 1.0f, 1.0f, 1.0f};
147 if (gz->
ptr !=
nullptr) {
193 if ((part_index >= 0) && (part_index < gz->op_data.size())) {
194 return &gz->
op_data[part_index];
205 if (part_index >= gz->
op_data.size()) {
206 gz->
op_data.resize(part_index + 1);
246 const float z_axis[3])
250 const float z_global[3] = {0.0f, 0.0f, 1.0f};
264 const float y_axis[3],
265 const float z_axis[3])
278 const float y_axis[3],
279 const float z_axis[3])
293 const float y_axis[3],
294 const float z_axis[3])
359 bool changed =
false;
382 if (use_callback && changed) {
459 float matrix_world[4][4];
461 float matrix_basis[4][4];
531 float final_matrix[4][4];
540 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
545 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
548 mul_m4_m4m4(final_matrix, final_matrix, matrix_offset);
558 float mat_identity[4][4];
605 if (*properties ==
nullptr) {
609 if (*ptr ==
nullptr) {
610 *ptr = MEM_new<PointerRNA>(
"wmOpItemPtr");
614 (*ptr)->data = *properties;
648 bool changed =
false;
653 if (ptype != RNA_Struct) {
Read Blender memory allocation and freeing.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float3x3 scale(float3x3 mat, float2 scale)
std::unique_ptr< IDProperty, IDPropertyDeleter > create_group(StringRef prop_name, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_GROUP.
void WM_gizmo_free(wmGizmo *gz)
void WM_gizmo_set_matrix_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void WM_gizmo_modal_set_from_setup(wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, int part_index, const wmEvent *event)
void WM_gizmo_properties_alloc(PointerRNA **ptr, IDProperty **properties, const StringRef gtstring)
static void wm_gizmo_register(wmGizmoGroup *gzgroup, wmGizmo *gz)
void wm_gizmomap_select_array_remove(wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_get_color_highlight(const wmGizmo *gz, float color_hi[4])
wmGizmo * WM_gizmomap_get_modal(const wmGizmoMap *gzmap)
static void wm_gizmo_set_matrix_rotation_from_z_axis__internal(float matrix[4][4], const float z_axis[3])
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void WM_gizmo_set_matrix_rotation_from_yz_axis(wmGizmo *gz, const float y_axis[3], const float z_axis[3])
bool RNA_property_reset(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index)
void WM_operator_properties_free(PointerRNA *ptr)
void WM_gizmo_set_color(wmGizmo *gz, const float color[4])
const char * RNA_property_identifier(const PropertyRNA *prop)
void WM_gizmo_modal_set_while_modal(wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, const wmEvent *event)
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)
IDProperty * IDP_CopyProperty(const IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void wm_gizmogroup_gizmo_register(wmGizmoGroup *gzgroup, wmGizmo *gz)
wmOperatorStatus WM_gizmo_operator_invoke(bContext *C, wmGizmo *gz, wmGizmoOpElem *gzop, const wmEvent *event)
void WM_gizmo_calc_matrix_final_params(const wmGizmo *gz, const wmGizmoMatrixParams *params, float r_mat[4][4])
void mul_mat3_m4_fl(float R[4][4], float f)
void WM_gizmo_properties_create(PointerRNA *ptr, const StringRef gtstring)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
void WM_gizmo_calc_matrix_final_no_offset(const wmGizmo *gz, float r_mat[4][4])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4])
void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4])
void WM_gizmo_get_color(const wmGizmo *gz, float color[4])
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
void WM_gizmo_set_matrix_offset_location(wmGizmo *gz, const float offset[3])
bool WM_gizmo_highlight_set(wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_set_line_width(wmGizmo *gz, const float line_width)
void wm_gizmo_calculate_scale(wmGizmo *gz, const bContext *C)
void IDP_MergeGroup(IDProperty *dest, const IDProperty *src, bool do_overwrite) ATTR_NONNULL()
bool wm_gizmo_select_and_highlight(bContext *C, wmGizmoMap *gzmap, wmGizmo *gz)
void WM_gizmo_properties_create_ptr(PointerRNA *ptr, wmGizmoType *gzt)
void WM_gizmo_unlink(ListBaseT< wmGizmo > *gizmolist, wmGizmoMap *gzmap, wmGizmo *gz, bContext *C)
void WM_gizmo_set_scale(wmGizmo *gz, const float scale)
static void gizmo_init(wmGizmo *gz)
bool wm_gizmo_select_set_ex(wmGizmoMap *gzmap, wmGizmo *gz, bool select, bool use_array, bool use_callback)
void wm_gizmomap_select_array_push_back(wmGizmoMap *gzmap, wmGizmo *gz)
PropertyType RNA_property_type(PropertyRNA *prop)
void WM_gizmo_set_flag(wmGizmo *gz, const int flag, const bool enable)
void IDP_ClearProperty(IDProperty *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void wm_gizmo_update(wmGizmo *gz, const bContext *C, const bool refresh_map)
int wm_gizmo_is_visible(wmGizmo *gz)
void WM_gizmo_set_fn_custom_modal(wmGizmo *gz, wmGizmoFnModal fn)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool WM_gizmo_context_check_drawstep(const bContext *C, eWM_GizmoFlagMapDrawStep step)
void WM_gizmo_properties_free(PointerRNA *ptr)
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])
int RNA_property_flag(PropertyRNA *prop)
PointerRNA * WM_gizmo_operator_set(wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
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)
void unit_m4(float m[4][4])
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_gizmo_properties_reset(wmGizmo *gz)
wmGizmo * WM_gizmo_new(const StringRef idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
bool WM_gizmo_group_is_modal(const wmGizmoGroup *gzgroup)
bool WM_gizmo_properties_default(PointerRNA *ptr, const bool do_update)
void WM_gizmo_set_matrix_offset_rotation_from_yz_axis(wmGizmo *gz, const float y_axis[3], const float z_axis[3])
bool RNA_struct_system_idprops_unset(PointerRNA *ptr, const char *identifier)
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void WM_gizmo_properties_sanitize(PointerRNA *ptr, const bool no_context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void WM_gizmo_properties_clear(PointerRNA *ptr)
@ WM_GIZMOGROUPTYPE_SCALE
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMO_DRAW_OFFSET_SCALE
MINLINE float normalize_v3(float n[3])
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
@ WM_GIZMO_STATE_HIGHLIGHT
bool WM_gizmo_select_set(wmGizmoMap *gzmap, wmGizmo *gz, bool select)
bToolRef * WM_toolsystem_ref_from_context(const bContext *C)
float ED_view3d_pixel_size_no_ui_scale(const RegionView3D *rv3d, const float co[3])
void IDP_FreeProperty(IDProperty *prop)
static void gizmo_update_prop_data(wmGizmo *gz)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_gizmo_set_matrix_offset_rotation_from_z_axis(wmGizmo *gz, const float z_axis[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
wmOperatorStatus(*)(bContext *, wmGizmo *, const wmEvent *, eWM_GizmoFlagTweak) wmGizmoFnModal
void copy_m4_m4(float m1[4][4], const float m2[4][4])
wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3])
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
void wm_gizmomap_modal_set(wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, const wmEvent *event, bool enable)
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
@ WM_GIZMO_IS_VISIBLE_UPDATE
@ WM_GIZMO_IS_VISIBLE_DRAW
bool WM_gizmo_select_unlink(wmGizmoMap *gzmap, wmGizmo *gz)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void rotation_between_vecs_to_mat3(float m[3][3], const float v1[3], const float v2[3])
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
static wmGizmo * wm_gizmo_create(const wmGizmoType *gzt, PointerRNA *properties)
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eWM_GizmoFlagGroupTypeFlag flag
wmGizmoMap * parent_gzmap
struct blender::wmGizmoMap::@077047172235271304035100110332311133341144335100 gzmap_context
const float * scale_final
const float(* matrix_space)[4]
const float(* matrix_basis)[4]
const float(* matrix_offset)[4]
struct blender::wmGizmoProperty::@216011055122204070127377170176223170047224321165 custom_func
int target_property_defs_len
wmGizmoFnMatrixBasisGet matrix_basis_get
wmGizmoFnSelectRefresh select_refresh
wmGizmoFnPropertyUpdate property_update
float matrix_offset[4][4]
wmGizmoGroup * parent_gzgroup
Vector< wmGizmoProperty, 0 > target_properties
wmGizmoFnModal custom_modal
Vector< wmGizmoOpElem, 4 > op_data