Blender V5.0
view3d_navigate_view_all.cc File Reference
#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)

Typedef Documentation

◆ float3

Definition at line 619 of file BLI_math_vector_types.hh.

Function Documentation

◆ view3d_all_exec()

◆ view3d_calc_minmax_selected()

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.

Parameters
depsgraphThe evaluated depsgraph.
clip_boundsClip the bounds by the viewport clipping.
r_do_zoomWhen 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().

◆ view3d_calc_minmax_visible()

std::optional< blender::Bounds< float3 > > view3d_calc_minmax_visible ( Depsgraph * depsgraph,
ScrArea * area,
ARegion * region,
bool use_all_regions,
bool clip_bounds )

◆ view3d_calc_point_in_selected_bounds()

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 )

◆ view3d_from_minmax()

◆ view3d_from_minmax_multi()

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

◆ view3d_object_calc_minmax()

void view3d_object_calc_minmax ( Depsgraph * depsgraph,
Scene * scene,
Object * ob_eval,
const bool only_center,
float3 & min,
float3 & max )
static

◆ view3d_object_skip_minmax()

bool view3d_object_skip_minmax ( const View3D * v3d,
const RegionView3D * rv3d,
const Object * ob,
const bool skip_camera,
bool * r_only_center )
static

◆ VIEW3D_OT_view_all()

◆ VIEW3D_OT_view_selected()

◆ viewselected_exec()