|
Blender V5.0
|
#include "BLI_listbase.h"#include "BLI_math_base_safe.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "DEG_depsgraph.hh"#include "DNA_light_types.h"#include "DNA_object_types.h"#include "ED_gizmo_library.hh"#include "UI_resources.hh"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "view3d_intern.hh"Go to the source code of this file.
Classes | |
| struct | LightSpotWidgetGroup |
| #define CONE_SCALE 10.0f |
Definition at line 42 of file view3d_gizmo_light.cc.
Referenced by gizmo_spot_blend_prop_matrix_get(), and WIDGETGROUP_light_spot_refresh().
| #define INV_CONE_SCALE 0.1f |
Definition at line 43 of file view3d_gizmo_light.cc.
Referenced by gizmo_spot_blend_prop_matrix_set().
|
static |
Definition at line 431 of file view3d_gizmo_light.cc.
References Light::area_shape, wmGizmoProperty::custom_func, ELEM, Light::id, LA_AREA_ELLIPSE, LA_AREA_RECT, ptr, RNA_pointer_create_discrete(), RNA_struct_find_property(), and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_area_refresh().
|
static |
Definition at line 447 of file view3d_gizmo_light.cc.
References Light::area_shape, Light::area_size, Light::area_sizey, wmGizmoPropertyType::array_length, BLI_assert, wmGizmoProperty::custom_func, ELEM, float, LA_AREA_ELLIPSE, LA_AREA_RECT, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_area_refresh().
|
static |
Definition at line 460 of file view3d_gizmo_light.cc.
References Light::area_shape, Light::area_size, Light::area_sizey, wmGizmoPropertyType::array_length, BLI_assert, wmGizmoProperty::custom_func, DEG_id_tag_update(), ELEM, float, Light::id, ID_RECALC_PARAMETERS, LA_AREA_ELLIPSE, LA_AREA_RECT, len_v3(), NC_LAMP, ND_LIGHTING_DRAW, wmGizmoProperty::type, wmGizmoProperty::user_data, and WM_main_add_notifier().
Referenced by WIDGETGROUP_light_area_refresh().
|
static |
Definition at line 116 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, Light::id, ptr, RNA_pointer_create_discrete(), RNA_struct_find_property(), and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_point_setup(), and WIDGETGROUP_light_spot_setup().
|
static |
Definition at line 131 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, C, CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, float, Light::radius, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_point_setup(), and WIDGETGROUP_light_spot_setup().
|
static |
Definition at line 148 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, float, Light::id, len_v3(), RNA_pointer_create_discrete(), RNA_property_float_set(), RNA_property_update_main(), RNA_struct_find_property(), wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_point_setup(), and WIDGETGROUP_light_spot_setup().
|
static |
Definition at line 74 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, Light::id, ptr, RNA_pointer_create_discrete(), RNA_struct_find_property(), and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_spot_setup().
|
static |
Definition at line 51 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, b, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, C, CONE_SCALE, cosf, CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, float, Light::spotblend, Light::spotsize, sqrtf, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_spot_setup().
|
static |
Definition at line 89 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, C, clamp_f(), cosf, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, float, Light::id, INV_CONE_SCALE, RNA_pointer_create_discrete(), RNA_property_float_set(), RNA_property_update_main(), RNA_struct_find_property(), safe_divide(), Light::spotsize, sqrt, wmGizmoProperty::type, and wmGizmoProperty::user_data.
Referenced by WIDGETGROUP_light_spot_setup().
| void VIEW3D_GGT_light_area | ( | wmGizmoGroupType * | gzgt | ) |
Definition at line 556 of file view3d_gizmo_light.cc.
References wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, WIDGETGROUP_light_area_poll(), WIDGETGROUP_light_area_refresh(), WIDGETGROUP_light_area_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DEPTH_3D, and WM_GIZMOGROUPTYPE_PERSISTENT.
Referenced by view3d_widgets().
| void VIEW3D_GGT_light_point | ( | wmGizmoGroupType * | gzgt | ) |
Definition at line 410 of file view3d_gizmo_light.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, WIDGETGROUP_light_point_draw_prepare(), WIDGETGROUP_light_point_poll(), WIDGETGROUP_light_point_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DEPTH_3D, and WM_GIZMOGROUPTYPE_PERSISTENT.
Referenced by view3d_widgets().
| void VIEW3D_GGT_light_spot | ( | wmGizmoGroupType * | gzgt | ) |
Definition at line 315 of file view3d_gizmo_light.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::refresh, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, WIDGETGROUP_light_spot_draw_prepare(), WIDGETGROUP_light_spot_poll(), WIDGETGROUP_light_spot_refresh(), WIDGETGROUP_light_spot_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DEPTH_3D, and WM_GIZMOGROUPTYPE_PERSISTENT.
Referenced by view3d_widgets().
| void VIEW3D_GGT_light_target | ( | wmGizmoGroupType * | gzgt | ) |
Definition at line 655 of file view3d_gizmo_light.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::setup, wmGizmoGroupType::setup_keymap, WIDGETGROUP_light_target_draw_prepare(), WIDGETGROUP_light_target_poll(), WIDGETGROUP_light_target_setup(), WM_gizmogroup_setup_keymap_generic_maybe_drag(), WM_GIZMOGROUPTYPE_3D, and WM_GIZMOGROUPTYPE_PERSISTENT.
Referenced by view3d_widgets().
|
static |
Definition at line 480 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_id_is_editable(), BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, Light::id, LA_AREA, OB_LAMP, Base::object, Light::type, Object::type, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_CONTEXT, and V3D_GIZMO_SHOW_LIGHT_SIZE.
Referenced by VIEW3D_GGT_light_area().
|
static |
Definition at line 528 of file view3d_gizmo_light.cc.
References Light::area_shape, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, copy_m4_m4(), CTX_data_scene(), CTX_data_view_layer(), wmGizmoGroup::customdata, Object::data, ED_GIZMO_CAGE_XFORM_FLAG_SCALE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE_UNIFORM, ELEM, flag, wmGizmoWrapper::gizmo, gizmo_area_light_foreach_rna_prop(), gizmo_area_light_prop_matrix_get(), gizmo_area_light_prop_matrix_set(), LA_AREA_DISK, LA_AREA_SQUARE, wmGizmo::matrix_basis, params, wmGizmo::ptr, RNA_enum_set(), and WM_gizmo_target_property_def_func().
Referenced by VIEW3D_GGT_light_area().
|
static |
Definition at line 508 of file view3d_gizmo_light.cc.
References wmGizmo::color, wmGizmo::color_hi, wmGizmoGroup::customdata, ED_GIZMO_CAGE_XFORM_FLAG_SCALE, wmGizmoWrapper::gizmo, wmGizmoGroup::gizmos, LISTBASE_FOREACH, MEM_mallocN(), wmGizmo::ptr, RNA_enum_set(), TH_GIZMO_HI, TH_GIZMO_PRIMARY, UI_GetThemeColor3fv(), WM_GIZMO_DRAW_HOVER, WM_GIZMO_NEEDS_UNDO, WM_gizmo_new(), and WM_gizmo_set_flag().
Referenced by VIEW3D_GGT_light_area().
|
static |
Definition at line 393 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), wmGizmoGroup::customdata, wmGizmoWrapper::gizmo, ARegion::regiondata, RegionView3D::viewinv, WM_gizmo_set_matrix_location(), and WM_gizmo_set_matrix_rotation_from_z_axis().
Referenced by VIEW3D_GGT_light_point().
|
static |
Definition at line 335 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_id_is_editable(), BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, Light::id, LA_LOCAL, OB_LAMP, Base::object, Light::type, Object::type, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_CONTEXT, and V3D_GIZMO_SHOW_LIGHT_SIZE.
Referenced by VIEW3D_GGT_light_point().
|
static |
Definition at line 363 of file view3d_gizmo_light.cc.
References C, wmGizmo::color, wmGizmo::color_hi, wmGizmoGroup::customdata, ED_GIZMO_CAGE2D_STYLE_CIRCLE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE_UNIFORM, wmGizmoWrapper::gizmo, gizmo_light_radius_foreach_rna_prop(), gizmo_light_radius_prop_matrix_get(), gizmo_light_radius_prop_matrix_set(), wmGizmoGroup::gizmos, LISTBASE_FOREACH, MEM_mallocN(), params, wmGizmo::ptr, RNA_enum_set(), TH_GIZMO_HI, TH_GIZMO_PRIMARY, UI_GetThemeColor3fv(), WM_GIZMO_DRAW_HOVER, WM_GIZMO_NEEDS_UNDO, WM_gizmo_new(), WM_gizmo_set_flag(), and WM_gizmo_target_property_def_func().
Referenced by VIEW3D_GGT_light_point().
|
static |
Definition at line 298 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), wmGizmoGroup::customdata, ARegion::regiondata, LightSpotWidgetGroup::spot_radius, RegionView3D::viewinv, WM_gizmo_set_matrix_location(), and WM_gizmo_set_matrix_rotation_from_z_axis().
Referenced by VIEW3D_GGT_light_spot().
|
static |
Definition at line 170 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_id_is_editable(), BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, Light::id, LA_SPOT, OB_LAMP, Base::object, Light::type, Object::type, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_CONTEXT, and V3D_GIZMO_SHOW_LIGHT_SIZE.
Referenced by VIEW3D_GGT_light_spot().
|
static |
Definition at line 261 of file view3d_gizmo_light.cc.
References add_v3_v3(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CONE_SCALE, copy_m4_m4(), cosf, CTX_data_scene(), CTX_data_view_layer(), wmGizmoGroup::customdata, Object::data, Light::id, wmGizmo::matrix_basis, mul_v3_fl(), negate_v3_v3(), RNA_pointer_create_discrete(), LightSpotWidgetGroup::spot_angle, LightSpotWidgetGroup::spot_blend, Light::spotsize, WM_gizmo_set_matrix_location(), WM_gizmo_set_matrix_rotation_from_z_axis(), and WM_gizmo_target_property_def_rna().
Referenced by VIEW3D_GGT_light_spot().
|
static |
Definition at line 198 of file view3d_gizmo_light.cc.
References C, wmGizmo::color, wmGizmo::color_hi, wmGizmoGroup::customdata, ED_gizmo_arrow3d_set_range_fac(), ED_GIZMO_ARROW_XFORM_FLAG_INVERTED, ED_GIZMO_CAGE2D_STYLE_CIRCLE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE_UNIFORM, gizmo_light_radius_foreach_rna_prop(), gizmo_light_radius_prop_matrix_get(), gizmo_light_radius_prop_matrix_set(), gizmo_spot_blend_foreach_rna_prop(), gizmo_spot_blend_prop_matrix_get(), gizmo_spot_blend_prop_matrix_set(), wmGizmoGroup::gizmos, LISTBASE_FOREACH, MEM_mallocN(), params, wmGizmo::ptr, RNA_enum_set(), LightSpotWidgetGroup::spot_angle, LightSpotWidgetGroup::spot_blend, LightSpotWidgetGroup::spot_radius, TH_GIZMO_HI, TH_GIZMO_PRIMARY, TH_GIZMO_SECONDARY, UI_GetThemeColor3fv(), WM_GIZMO_DRAW_HOVER, WM_GIZMO_NEEDS_UNDO, WM_gizmo_new(), WM_gizmo_set_flag(), and WM_gizmo_target_property_def_func().
Referenced by VIEW3D_GGT_light_spot().
|
static |
Definition at line 632 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), wmGizmoGroup::customdata, Object::data, wmGizmoWrapper::gizmo, LA_SPOT, madd_v3_v3fl(), wmGizmo::matrix_basis, wmGizmo::matrix_offset, normalize_m4_m4(), OB_LAMP, Light::spotsize, Light::type, Object::type, unit_m4(), WM_GIZMO_DRAW_OFFSET_SCALE, and WM_gizmo_set_flag().
Referenced by VIEW3D_GGT_light_target().
|
static |
Definition at line 575 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_id_is_editable(), BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, ELEM, View3D::gizmo_flag, View3D::gizmo_show_light, Object::id, LA_AREA, LA_SPOT, LA_SUN, OB_CAMERA, OB_LAMP, Base::object, Light::type, Object::type, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_CONTEXT, and V3D_GIZMO_SHOW_LIGHT_LOOK_AT.
Referenced by VIEW3D_GGT_light_target().
|
static |
Definition at line 609 of file view3d_gizmo_light.cc.
References wmGizmo::color, wmGizmo::color_hi, wmGizmoGroup::customdata, ED_GIZMO_MOVE_DRAW_FLAG_ALIGN_VIEW, ED_GIZMO_MOVE_DRAW_FLAG_FILL, wmGizmoWrapper::gizmo, MEM_mallocN(), ot, wmGizmo::ptr, RNA_enum_set(), wmGizmo::scale_basis, TH_GIZMO_HI, TH_GIZMO_PRIMARY, UI_GetThemeColor3fv(), WM_gizmo_new(), WM_gizmo_operator_set(), and WM_operatortype_find().
Referenced by VIEW3D_GGT_light_target().