Blender
V3.3
|
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "wm.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "wm_gizmo_intern.h"
#include "wm_gizmo_wmapi.h"
Go to the source code of this file.
void WM_gizmo_do_msg_notify_tag_refresh | ( | bContext * | UNUSEDC, |
wmMsgSubscribeKey * | UNUSEDmsg_key, | ||
wmMsgSubscribeValue * | msg_val | ||
) |
Definition at line 294 of file wm_gizmo_target_props.c.
References ED_region_tag_redraw(), wmMsgSubscribeValue::owner, wmMsgSubscribeValue::user_data, and WM_gizmomap_tag_refresh().
Referenced by gizmo2d_pivot_point_message_subscribe(), gizmo_mesh_extrude_message_subscribe(), gizmo_mesh_spin_init_message_subscribe(), gizmo_xform_message_subscribe(), WIDGETGROUP_camera_message_subscribe(), and WIDGETGROUP_gizmo_message_subscribe().
void WM_gizmo_target_property_anim_autokey | ( | bContext * | C, |
const wmGizmo * | UNUSEDgz, | ||
wmGizmoProperty * | gz_prop | ||
) |
Definition at line 340 of file wm_gizmo_target_props.c.
References C, RenderData::cfra, CTX_data_scene(), ED_autokeyframe_property(), float(), wmGizmoProperty::index, NULL, wmGizmoProperty::prop, wmGizmoProperty::ptr, Scene::r, and scene.
Referenced by gizmo_arrow_exit(), gizmo_dial_exit(), and gizmo_move_exit().
BLI_INLINE wmGizmoProperty* wm_gizmo_target_property_array | ( | wmGizmo * | gz | ) |
Definition at line 34 of file wm_gizmo_target_props.c.
References POINTER_OFFSET, wmGizmoType::struct_size, and wmGizmo::type.
Referenced by WM_gizmo_target_property_array(), WM_gizmo_target_property_at_index(), and WM_gizmo_target_property_is_valid_any().
wmGizmoProperty* WM_gizmo_target_property_array | ( | wmGizmo * | gz | ) |
Definition at line 39 of file wm_gizmo_target_props.c.
References wm_gizmo_target_property_array().
Referenced by gizmo_update_prop_data(), ui_tooltip_data_from_gizmo(), WM_gizmo_free(), and WM_gizmo_target_property_subscribe_all().
int WM_gizmo_target_property_array_length | ( | const wmGizmo * | UNUSEDgz, |
wmGizmoProperty * | gz_prop | ||
) |
Definition at line 249 of file wm_gizmo_target_props.c.
References wmGizmoPropertyType::array_length, wmGizmoProperty::custom_func, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_array_length(), wmGizmoProperty::type, and wmGizmoProperty::value_get_fn.
Referenced by bpy_gizmo_target_get_value(), bpy_gizmo_target_set_value(), gizmo_cage2d_property_update(), and gizmo_cage3d_property_update().
wmGizmoProperty* WM_gizmo_target_property_at_index | ( | wmGizmo * | gz, |
int | index | ||
) |
Definition at line 44 of file wm_gizmo_target_props.c.
References BLI_assert, type, and wm_gizmo_target_property_array().
Referenced by WM_gizmo_target_property_clear_rna_ptr(), WM_gizmo_target_property_def_func_ptr(), WM_gizmo_target_property_def_rna_ptr(), and WM_gizmo_target_property_find().
Definition at line 140 of file wm_gizmo_target_props.c.
References wmGizmo::type, WM_gizmo_target_property_clear_rna_ptr(), and WM_gizmotype_target_property_find().
void WM_gizmo_target_property_clear_rna_ptr | ( | wmGizmo * | gz, |
const wmGizmoPropertyType * | gz_prop_type | ||
) |
Definition at line 126 of file wm_gizmo_target_props.c.
References BLI_assert, wmGizmoProperty::index, wmGizmoPropertyType::index_in_type, NULL, wmGizmo::op_data, PointerRNA_NULL, wmGizmoProperty::prop, wmGizmoProperty::ptr, wmGizmoProperty::type, and WM_gizmo_target_property_at_index().
Referenced by WIDGETGROUP_camera_refresh(), and WM_gizmo_target_property_clear_rna().
void WM_gizmo_target_property_def_func | ( | wmGizmo * | gz, |
const char * | idname, | ||
const wmGizmoPropertyFnParams * | params | ||
) |
Definition at line 118 of file wm_gizmo_target_props.c.
References params, wmGizmo::type, WM_gizmo_target_property_def_func_ptr(), and WM_gizmotype_target_property_find().
Referenced by gizmo_mesh_bisect_setup(), gizmo_mesh_placement_setup(), gizmo_mesh_spin_redo_setup(), WIDGETGROUP_armature_spline_refresh(), WIDGETGROUP_camera_view_refresh(), WIDGETGROUP_empty_image_refresh(), WIDGETGROUP_light_area_refresh(), blender::ed::space_node::WIDGETGROUP_node_crop_refresh(), and blender::ed::space_node::WIDGETGROUP_node_transform_refresh().
void WM_gizmo_target_property_def_func_ptr | ( | wmGizmo * | gz, |
const wmGizmoPropertyType * | gz_prop_type, | ||
const wmGizmoPropertyFnParams * | params | ||
) |
Definition at line 96 of file wm_gizmo_target_props.c.
References BLI_assert, wmGizmoProperty::custom_func, wmGizmoProperty::free_fn, wmGizmoPropertyType::index_in_type, NULL, wmGizmo::op_data, params, wmGizmoType::property_update, wmGizmoProperty::range_get_fn, wmGizmo::type, wmGizmoProperty::type, wmGizmoProperty::user_data, wmGizmoProperty::value_get_fn, wmGizmoProperty::value_set_fn, and WM_gizmo_target_property_at_index().
Referenced by bpy_gizmo_target_set_handler(), and WM_gizmo_target_property_def_func().
void WM_gizmo_target_property_def_rna | ( | wmGizmo * | gz, |
const char * | idname, | ||
PointerRNA * | ptr, | ||
const char * | propname, | ||
int | index | ||
) |
Definition at line 85 of file wm_gizmo_target_props.c.
References NULL, ptr, RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, PointerRNA::type, wmGizmo::type, WM_gizmo_target_property_def_rna_ptr(), and WM_gizmotype_target_property_find().
Referenced by WIDGETGROUP_camera_refresh(), WIDGETGROUP_forcefield_refresh(), WIDGETGROUP_light_spot_refresh(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_refresh(), blender::ed::space_node::WIDGETGROUP_node_sbeam_refresh(), and blender::ed::space_node::WIDGETGROUP_node_transform_refresh().
void WM_gizmo_target_property_def_rna_ptr | ( | wmGizmo * | gz, |
const wmGizmoPropertyType * | gz_prop_type, | ||
PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
int | index | ||
) |
Definition at line 62 of file wm_gizmo_target_props.c.
References BLI_assert, wmGizmoProperty::index, wmGizmoPropertyType::index_in_type, NULL, wmGizmo::op_data, wmGizmoProperty::prop, wmGizmoType::property_update, wmGizmoProperty::ptr, ptr, wmGizmo::type, wmGizmoProperty::type, and WM_gizmo_target_property_at_index().
Referenced by WIDGETGROUP_camera_refresh(), and WM_gizmo_target_property_def_rna().
wmGizmoProperty* WM_gizmo_target_property_find | ( | wmGizmo * | gz, |
const char * | idname | ||
) |
Definition at line 52 of file wm_gizmo_target_props.c.
References BLI_findstringindex(), NULL, wmGizmoType::target_property_defs, wmGizmo::type, and WM_gizmo_target_property_at_index().
Referenced by dial_draw_intern(), ED_gizmo_arrow3d_set_range_fac(), ED_gizmo_arrow3d_set_ui_range(), gizmo_arrow_exit(), gizmo_arrow_invoke(), gizmo_arrow_modal(), gizmo_cage2d_exit(), gizmo_cage2d_modal(), gizmo_cage3d_exit(), gizmo_cage3d_modal(), gizmo_dial_exit(), gizmo_dial_invoke(), gizmo_dial_modal(), gizmo_move_exit(), gizmo_move_invoke(), gizmo_move_modal(), py_rna_gizmo_target_id_parse(), and snap_gizmo_snap_elements_update().
float WM_gizmo_target_property_float_get | ( | const wmGizmo * | gz, |
wmGizmoProperty * | gz_prop | ||
) |
Definition at line 170 of file wm_gizmo_target_props.c.
References wmGizmoPropertyType::array_length, BLI_assert, wmGizmoProperty::custom_func, wmGizmoProperty::index, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_float_get(), RNA_property_float_get_index(), wmGizmoProperty::type, and wmGizmoProperty::value_get_fn.
Referenced by bpy_gizmo_target_get_value(), dial_draw_intern(), gizmo_arrow_exit(), gizmo_arrow_invoke(), gizmo_arrow_modal(), gizmo_dial_invoke(), and gizmo_property_data_update().
void WM_gizmo_target_property_float_get_array | ( | const wmGizmo * | gz, |
wmGizmoProperty * | gz_prop, | ||
float * | value | ||
) |
Definition at line 206 of file wm_gizmo_target_props.c.
References wmGizmoProperty::custom_func, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_float_get_array(), and wmGizmoProperty::value_get_fn.
Referenced by bpy_gizmo_target_get_value(), gizmo_cage2d_modal(), gizmo_cage2d_property_update(), gizmo_cage3d_modal(), gizmo_cage3d_property_update(), gizmo_move_invoke(), and gizmo_move_property_update().
bool WM_gizmo_target_property_float_range_get | ( | const wmGizmo * | gz, |
wmGizmoProperty * | gz_prop, | ||
float | range[2] | ||
) |
Definition at line 231 of file wm_gizmo_target_props.c.
References wmGizmoProperty::custom_func, wmGizmoProperty::prop, wmGizmoProperty::ptr, wmGizmoProperty::range_get_fn, RNA_property_float_ui_range(), and wmGizmoProperty::value_get_fn.
Referenced by bpy_gizmo_target_get_range(), and gizmo_property_data_update().
void WM_gizmo_target_property_float_set | ( | bContext * | C, |
const wmGizmo * | gz, | ||
wmGizmoProperty * | gz_prop, | ||
const float | value | ||
) |
Definition at line 185 of file wm_gizmo_target_props.c.
References wmGizmoPropertyType::array_length, BLI_assert, C, wmGizmoProperty::custom_func, wmGizmoProperty::index, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_float_set(), RNA_property_float_set_index(), RNA_property_update(), wmGizmoProperty::type, and wmGizmoProperty::value_set_fn.
Referenced by bpy_gizmo_target_set_value(), gizmo_arrow_modal(), gizmo_dial_exit(), gizmo_dial_modal(), and gizmo_property_value_reset().
void WM_gizmo_target_property_float_set_array | ( | bContext * | C, |
const wmGizmo * | gz, | ||
wmGizmoProperty * | gz_prop, | ||
const float * | value | ||
) |
Definition at line 217 of file wm_gizmo_target_props.c.
References C, wmGizmoProperty::custom_func, wmGizmoProperty::prop, wmGizmoProperty::ptr, RNA_property_float_set_array(), RNA_property_update(), and wmGizmoProperty::value_set_fn.
Referenced by bpy_gizmo_target_set_value(), gizmo_cage2d_exit(), gizmo_cage2d_modal(), gizmo_cage3d_exit(), gizmo_cage3d_modal(), gizmo_move_exit(), and gizmo_move_modal().
bool WM_gizmo_target_property_is_valid | ( | const wmGizmoProperty * | gz_prop | ) |
Definition at line 164 of file wm_gizmo_target_props.c.
References wmGizmoProperty::custom_func, NULL, wmGizmoProperty::prop, wmGizmoProperty::value_get_fn, and wmGizmoProperty::value_set_fn.
Referenced by dial_draw_intern(), ED_gizmo_arrow3d_set_range_fac(), ED_gizmo_arrow3d_set_ui_range(), gizmo_arrow_exit(), gizmo_arrow_invoke(), gizmo_arrow_modal(), gizmo_dial_exit(), gizmo_dial_invoke(), gizmo_dial_modal(), gizmo_move_exit(), gizmo_move_invoke(), gizmo_move_modal(), gizmo_move_property_update(), gizmo_update_prop_data(), py_rna_gizmo_target_id_parse_and_ensure_is_valid(), WM_gizmo_target_property_is_valid_any(), and WM_gizmo_target_property_subscribe_all().
Definition at line 152 of file wm_gizmo_target_props.c.
References wmGizmoType::target_property_defs_len, wmGizmo::type, wm_gizmo_target_property_array(), and WM_gizmo_target_property_is_valid().
void WM_gizmo_target_property_subscribe_all | ( | struct wmGizmo * | gz, |
struct wmMsgBus * | mbus, | ||
struct ARegion * | region | ||
) |
Runs on the "prepare draw" pass, drawing the region clears.
Definition at line 308 of file wm_gizmo_target_props.c.
References wmGizmoProperty::prop, wmGizmoProperty::ptr, wmGizmoType::target_property_defs_len, wmGizmo::type, WM_gizmo_target_property_array(), WM_gizmo_target_property_is_valid(), and WM_msg_subscribe_rna().
Referenced by WM_gizmomap_message_subscribe().
void WM_gizmotype_target_property_def | ( | wmGizmoType * | gzt, |
const char * | idname, | ||
int | data_type, | ||
int | array_length | ||
) |
Definition at line 269 of file wm_gizmo_target_props.c.
References wmGizmoPropertyType::array_length, BLI_addtail(), BLI_assert, wmGizmoPropertyType::data_type, wmGizmoPropertyType::idname, wmGizmoPropertyType::index_in_type, MEM_callocN, NULL, wmGizmoType::target_property_defs, wmGizmoType::target_property_defs_len, and WM_gizmotype_target_property_find().
Referenced by bpy_gizmotype_target_property_def(), GIZMO_GT_arrow_3d(), GIZMO_GT_cage_2d(), GIZMO_GT_cage_3d(), GIZMO_GT_dial_3d(), GIZMO_GT_move_3d(), and GIZMO_GT_snap_3d().
const wmGizmoPropertyType* WM_gizmotype_target_property_find | ( | const wmGizmoType * | gzt, |
const char * | idname | ||
) |
Definition at line 263 of file wm_gizmo_target_props.c.
References BLI_findstring(), and wmGizmoType::target_property_defs.
Referenced by py_rna_gizmo_target_type_id_parse(), WIDGETGROUP_camera_refresh(), WM_gizmo_target_property_clear_rna(), WM_gizmo_target_property_def_func(), WM_gizmo_target_property_def_rna(), and WM_gizmotype_target_property_def().