|
Blender V4.3
|
#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 "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 |
Spot Light Gizmos | |
| #define | CONE_SCALE 10.0f |
| #define | INV_CONE_SCALE 0.1f |
| static void | gizmo_spot_blend_prop_matrix_get (const wmGizmo *, wmGizmoProperty *gz_prop, void *value_p) |
| static void | gizmo_spot_blend_prop_matrix_set (const wmGizmo *, wmGizmoProperty *gz_prop, const void *value_p) |
| static void | gizmo_light_radius_prop_matrix_get (const wmGizmo *, wmGizmoProperty *gz_prop, void *value_p) |
| static void | gizmo_light_radius_prop_matrix_set (const wmGizmo *, wmGizmoProperty *gz_prop, const void *value_p) |
| static bool | WIDGETGROUP_light_spot_poll (const bContext *C, wmGizmoGroupType *) |
| static void | WIDGETGROUP_light_spot_setup (const bContext *C, wmGizmoGroup *gzgroup) |
| static void | WIDGETGROUP_light_spot_refresh (const bContext *C, wmGizmoGroup *gzgroup) |
| static void | WIDGETGROUP_light_spot_draw_prepare (const bContext *C, wmGizmoGroup *gzgroup) |
| void | VIEW3D_GGT_light_spot (wmGizmoGroupType *gzgt) |
| #define CONE_SCALE 10.0f |
Definition at line 40 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 41 of file view3d_gizmo_light.cc.
Referenced by gizmo_spot_blend_prop_matrix_set().
|
static |
Definition at line 389 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 402 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 99 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, 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 116 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), wmGizmoProperty::custom_func, Object::data, float, Light::id, len_v3(), RNA_pointer_create(), 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 49 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, b, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, 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 72 of file view3d_gizmo_light.cc.
References wmGizmoPropertyType::array_length, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, 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(), 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 494 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 369 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 278 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 589 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 422 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, 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 467 of file view3d_gizmo_light.cc.
References Light::area_shape, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), 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_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 446 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 352 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), 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 298 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, 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 322 of file view3d_gizmo_light.cc.
References 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_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 261 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), 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 138 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, View3D::gizmo_flag, View3D::gizmo_show_light, 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 224 of file view3d_gizmo_light.cc.
References add_v3_v3(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), 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(), 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 162 of file view3d_gizmo_light.cc.
References 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_prop_matrix_get(), gizmo_light_radius_prop_matrix_set(), 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 566 of file view3d_gizmo_light.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), 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 513 of file view3d_gizmo_light.cc.
References BASE_SELECTABLE, BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, ELEM, View3D::gizmo_flag, View3D::gizmo_show_light, 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 542 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().