|
Blender V5.0
|
#include "BKE_armature.hh"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_library.hh"#include "BKE_object.hh"#include "BKE_paint.hh"#include "BKE_paint_types.hh"#include "BKE_scene.hh"#include "BKE_screen.hh"#include "BLI_bounds.hh"#include "BLI_listbase.h"#include "BLI_math_matrix.hh"#include "BLI_math_vector.h"#include "DEG_depsgraph_query.hh"#include "ED_mesh.hh"#include "ED_particle.hh"#include "ED_screen.hh"#include "WM_api.hh"#include "WM_message.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "view3d_intern.hh"#include "view3d_navigate.hh"Go to the source code of this file.
Typedefs | |
| using | float3 |
Functions | |
View All Operator | |
Move & Zoom the view to fit all of its contents. | |
| static bool | view3d_object_skip_minmax (const View3D *v3d, const RegionView3D *rv3d, const Object *ob, const bool skip_camera, bool *r_only_center) |
| static void | view3d_object_calc_minmax (Depsgraph *depsgraph, Scene *scene, Object *ob_eval, const bool only_center, float3 &min, float3 &max) |
| static void | view3d_from_minmax (bContext *C, View3D *v3d, ARegion *region, const float min[3], const float max[3], bool do_zoom, const int smooth_viewtx) |
| static void | view3d_from_minmax_multi (bContext *C, View3D *v3d, const float min[3], const float max[3], const bool do_zoom, const int smooth_viewtx) |
| static wmOperatorStatus | view3d_all_exec (bContext *C, wmOperator *op) |
| void | VIEW3D_OT_view_all (wmOperatorType *ot) |
High Level Viewport Bounds Calculation | |
Move & Zoom the view to fit all of its contents. | |
| std::optional< blender::Bounds< float3 > > | view3d_calc_minmax_visible (Depsgraph *depsgraph, ScrArea *area, ARegion *region, const bool use_all_regions, const bool clip_bounds) |
| std::optional< blender::Bounds< float3 > > | view3d_calc_minmax_selected (Depsgraph *depsgraph, ScrArea *area, ARegion *region, const bool use_all_regions, const bool clip_bounds, bool *r_do_zoom) |
| bool | view3d_calc_point_in_selected_bounds (Depsgraph *depsgraph, ViewLayer *view_layer, const View3D *v3d, const blender::float3 &point, const float scale_margin) |
Frame Selected Operator | |
Move & Zoom the view to fit selected contents. | |
| static wmOperatorStatus | viewselected_exec (bContext *C, wmOperator *op) |
| void | VIEW3D_OT_view_selected (wmOperatorType *ot) |
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
|
static |
Definition at line 435 of file view3d_navigate_view_all.cc.
References bounds(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_area(), CTX_wm_message_bus(), CTX_wm_region(), CTX_wm_view3d(), Scene::cursor, DEG_id_tag_update(), depsgraph, ED_region_tag_redraw(), ED_view3d_smooth_view_undo_begin(), ED_view3d_smooth_view_undo_end(), Scene::id, ID_RECALC_SYNC_TO_EVAL, blender::MatBase< float, 4, 4 >::identity(), max, min, minmax_v3v3_v3(), wmOperatorType::name, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), wmOperator::type, view3d_calc_minmax_visible(), view3d_from_minmax(), view3d_from_minmax_multi(), WM_msg_publish_rna_prop, and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_all().
| std::optional< blender::Bounds< float3 > > view3d_calc_minmax_selected | ( | Depsgraph * | depsgraph, |
| ScrArea * | area, | ||
| ARegion * | region, | ||
| bool | use_all_regions, | ||
| bool | clip_bounds, | ||
| bool * | r_do_zoom ) |
Return the bounds of selected contents of the 3D viewport.
| depsgraph | The evaluated depsgraph. |
| clip_bounds | Clip the bounds by the viewport clipping. |
| r_do_zoom | When false, the bounds should be treated as a point (don't zoom to view the point). |
Definition at line 244 of file view3d_navigate_view_all.cc.
References BASE_SELECTED, BASE_SELECTED_EDITABLE, BKE_paint_get_active_from_paintmode(), BKE_paint_select_face_test(), BKE_paint_stroke_get_average(), BKE_pose_minmax(), BKE_view_layer_active_object_get(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), bounds(), copy_v3_v3(), DEG_get_evaluated_scene(), DEG_get_evaluated_view_layer(), DEG_get_input_scene(), DEG_get_input_view_layer(), DEG_get_original(), depsgraph, ED_view3d_camera_lock_check(), ED_view3d_clipping_clamp_minmax(), ED_view3d_minmax_verts(), ListBase::first, View3D::flag2, FOREACH_OBJECT_IN_MODE_BEGIN, FOREACH_OBJECT_IN_MODE_END, INIT_MINMAX, Invalid, LISTBASE_FOREACH, blender::Bounds< T >::max, max, blender::Bounds< T >::min, min, minmax_v3v3_v3(), Object::mode, Base::next, OB_ARMATURE, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OBEDIT_FROM_OBACT, Base::object, paintface_minmax(), PE_minmax(), ARegion::regiondata, ARegion::runtime, RV3D_CLIPPING_ENABLED, Sculpt, ScrArea::spacedata, Texture3D, blender::bounds::transform_bounds(), Object::type, V3D_LOCK_CAMERA, Vertex, view3d_object_calc_minmax(), view3d_object_skip_minmax(), Weight, WM_gizmomap_is_any_selected(), and WM_gizmomap_minmax().
Referenced by viewselected_exec().
| std::optional< blender::Bounds< float3 > > view3d_calc_minmax_visible | ( | Depsgraph * | depsgraph, |
| ScrArea * | area, | ||
| ARegion * | region, | ||
| bool | use_all_regions, | ||
| bool | clip_bounds ) |
Return the bounds of visible contents of the 3D viewport.
| depsgraph | The evaluated depsgraph. |
| clip_bounds | Clip the bounds by the viewport clipping. |
Definition at line 194 of file view3d_navigate_view_all.cc.
References BASE_VISIBLE, BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), DEG_get_evaluated_scene(), DEG_get_evaluated_view_layer(), DEG_get_input_scene(), DEG_get_original(), depsgraph, ED_view3d_camera_lock_check(), ED_view3d_clipping_clamp_minmax(), ListBase::first, View3D::flag2, INIT_MINMAX, LISTBASE_FOREACH, max, min, ARegion::regiondata, RV3D_CLIPPING_ENABLED, ScrArea::spacedata, V3D_LOCK_CAMERA, view3d_object_calc_minmax(), and view3d_object_skip_minmax().
Referenced by view3d_all_exec().
| bool view3d_calc_point_in_selected_bounds | ( | Depsgraph * | depsgraph, |
| struct ViewLayer * | view_layer_eval, | ||
| const View3D * | v3d, | ||
| const blender::float3 & | point, | ||
| const float | scale_margin ) |
Iterate over objects and check if point might is inside any of them.
Definition at line 393 of file view3d_navigate_view_all.cc.
References BASE_SELECTED, BKE_view_layer_object_bases_get(), BLI_assert, bounds(), DEG_get_input_scene(), DEG_is_original(), depsgraph, LISTBASE_FOREACH, max, min, blender::math::transform_point(), and view3d_object_calc_minmax().
|
static |
Definition at line 89 of file view3d_navigate_view_all.cc.
References C, View3D::camera, V3D_SmoothParams::camera_old, CLAMP_MIN, CTX_data_ensure_evaluated_depsgraph(), depsgraph, V3D_SmoothParams::dist, ED_view3d_camera_lock_check(), ED_view3d_dist_soft_min_get(), ED_view3d_radius_to_dist(), ED_view3d_smooth_view(), ED_view3d_smooth_view_force_finish(), RegionView3D::is_persp, max, max_fff(), mid_v3_v3v3(), min, negate_v3(), V3D_SmoothParams::ofs, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_ORTHO, RV3D_PERSP, size(), sub_v3_v3v3(), V3D_SmoothParams::undo_str, and VIEW3D_MARGIN.
Referenced by view3d_all_exec(), view3d_from_minmax_multi(), and viewselected_exec().
|
static |
Same as view3d_from_minmax but for all regions (except cameras).
Definition at line 166 of file view3d_navigate_view_all.cc.
References C, CTX_wm_area(), ED_view3d_camera_lock_check(), LISTBASE_FOREACH, max, min, RegionView3D::persp, ScrArea::regionbase, RGN_TYPE_WINDOW, RV3D_CAMOB, and view3d_from_minmax().
Referenced by view3d_all_exec(), and viewselected_exec().
|
static |
Definition at line 70 of file view3d_navigate_view_all.cc.
References BKE_object_minmax(), BKE_object_minmax_dupli(), depsgraph, max, min, and minmax_v3v3_v3().
Referenced by view3d_calc_minmax_selected(), view3d_calc_minmax_visible(), and view3d_calc_point_in_selected_bounds().
|
static |
Definition at line 47 of file view3d_navigate_view_all.cc.
References BKE_object_empty_image_frame_is_visible_in_view3d(), BLI_assert, View3D::camera, Object::empty_drawtype, Object::id, OB_EMPTY, OB_EMPTY_IMAGE, ID::orig_id, and Object::type.
Referenced by view3d_calc_minmax_selected(), and view3d_calc_minmax_visible().
| void VIEW3D_OT_view_all | ( | wmOperatorType * | ot | ) |
Definition at line 493 of file view3d_navigate_view_all.cc.
References ED_operator_region_view3d_active(), ot, RNA_def_boolean(), V3D_OP_PROP_USE_ALL_REGIONS, view3d_all_exec(), and view3d_operator_properties_common().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_view_selected | ( | wmOperatorType * | ot | ) |
Definition at line 553 of file view3d_navigate_view_all.cc.
References ot, V3D_OP_PROP_USE_ALL_REGIONS, view3d_operator_properties_common(), view3d_zoom_or_dolly_poll(), and viewselected_exec().
Referenced by view3d_operatortypes().
|
static |
Definition at line 520 of file view3d_navigate_view_all.cc.
References bounds(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_area(), CTX_wm_region(), CTX_wm_view3d(), depsgraph, ED_view3d_smooth_view_undo_begin(), ED_view3d_smooth_view_undo_end(), max, min, wmOperatorType::name, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), wmOperator::type, view3d_calc_minmax_selected(), view3d_from_minmax(), view3d_from_minmax_multi(), and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_view_selected().