Blender V5.0
view3d_edit.cc File Reference
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
#include "DNA_world_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_rect.h"
#include "BLI_string_utf8.h"
#include "BKE_action.hh"
#include "BKE_armature.hh"
#include "BKE_camera.h"
#include "BKE_lib_id.hh"
#include "BKE_object.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BKE_screen.hh"
#include "DEG_depsgraph_query.hh"
#include "WM_api.hh"
#include "WM_message.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "ED_screen.hh"
#include "ED_transform.hh"
#include "ED_transform_snap_object_context.hh"
#include "ED_undo.hh"
#include "view3d_intern.hh"
#include "view3d_navigate.hh"

Go to the source code of this file.

Functions

static bool view3d_camera_user_poll (bContext *C)
static bool view3d_lock_poll (bContext *C)
View Lock Clear Operator
static wmOperatorStatus view_lock_clear_exec (bContext *C, wmOperator *)
void VIEW3D_OT_view_lock_clear (wmOperatorType *ot)
View Lock to Active Operator
static wmOperatorStatus view_lock_to_active_exec (bContext *C, wmOperator *)
void VIEW3D_OT_view_lock_to_active (wmOperatorType *ot)
Frame Camera Bounds Operator
static wmOperatorStatus view3d_center_camera_exec (bContext *C, wmOperator *)
void VIEW3D_OT_view_center_camera (wmOperatorType *ot)
View Lock Center Operator
static wmOperatorStatus view3d_center_lock_exec (bContext *C, wmOperator *)
void VIEW3D_OT_view_center_lock (wmOperatorType *ot)
Set Render Border Operator
static wmOperatorStatus render_border_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_render_border (wmOperatorType *ot)
Clear Render Border Operator
static wmOperatorStatus clear_render_border_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_clear_render_border (wmOperatorType *ot)
Set Camera Zoom 1:1 Operator

Sets the view to 1:1 camera/render-pixel.

static void view3d_set_1_to_1_viewborder (Scene *scene, Depsgraph *depsgraph, ARegion *region, View3D *v3d)
static wmOperatorStatus view3d_zoom_1_to_1_camera_exec (bContext *C, wmOperator *)
void VIEW3D_OT_zoom_camera_1_to_1 (wmOperatorType *ot)
View Toggle Perspective/Orthographic Operator
static wmOperatorStatus viewpersportho_exec (bContext *C, wmOperator *)
void VIEW3D_OT_view_persportho (wmOperatorType *ot)
View Navigate Operator

Wraps walk/fly modes.

static wmOperatorStatus view3d_navigate_invoke (bContext *C, wmOperator *, const wmEvent *event)
void VIEW3D_OT_navigate (wmOperatorType *ot)
Background Image Add Operator
static Camerabackground_image_camera_from_context (bContext *C)
static wmOperatorStatus camera_background_image_add_exec (bContext *C, wmOperator *op)
static bool camera_background_image_add_poll (bContext *C)
void VIEW3D_OT_camera_background_image_add (wmOperatorType *ot)
Background Image Remove Operator
static wmOperatorStatus camera_background_image_remove_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_camera_background_image_remove (wmOperatorType *ot)
Drop World Operator
static wmOperatorStatus drop_world_exec (bContext *C, wmOperator *op)
static bool drop_world_poll (bContext *C)
void VIEW3D_OT_drop_world (wmOperatorType *ot)
View Clipping Planes Operator

Draw border or toggle off.

static void calc_local_clipping (float clip_local[6][4], const BoundBox *clipbb, const float mat[4][4])
void ED_view3d_clipping_local (RegionView3D *rv3d, const float mat[4][4])
static wmOperatorStatus view3d_clipping_exec (bContext *C, wmOperator *op)
static wmOperatorStatus view3d_clipping_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_clip_border (wmOperatorType *ot)
Set Cursor Operator
void ED_view3d_cursor3d_position (bContext *C, const int mval[2], const bool use_depth, float r_cursor_co[3])
void ED_view3d_cursor3d_position_rotation (bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation, float r_cursor_co[3], float r_cursor_quat[4])
void ED_view3d_cursor3d_update (bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation)
static wmOperatorStatus view3d_cursor3d_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_cursor3d (wmOperatorType *ot)
Toggle XRay
static wmOperatorStatus toggle_xray_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_toggle_xray (wmOperatorType *ot)

Toggle Shading Operator

static const EnumPropertyItem prop_shading_type_items []
static wmOperatorStatus toggle_shading_exec (bContext *C, wmOperator *op)
void VIEW3D_OT_toggle_shading (wmOperatorType *ot)

Detailed Description

3D view manipulation/operators.

Definition in file view3d_edit.cc.

Function Documentation

◆ background_image_camera_from_context()

Camera * background_image_camera_from_context ( bContext * C)
static

◆ calc_local_clipping()

void calc_local_clipping ( float clip_local[6][4],
const BoundBox * clipbb,
const float mat[4][4] )
static

◆ camera_background_image_add_exec()

◆ camera_background_image_add_poll()

bool camera_background_image_add_poll ( bContext * C)
static

Definition at line 605 of file view3d_edit.cc.

References background_image_camera_from_context(), and C.

Referenced by VIEW3D_OT_camera_background_image_add().

◆ camera_background_image_remove_exec()

◆ clear_render_border_exec()

◆ drop_world_exec()

◆ drop_world_poll()

bool drop_world_poll ( bContext * C)
static

Definition at line 725 of file view3d_edit.cc.

References C, and ED_operator_scene_editable().

Referenced by VIEW3D_OT_drop_world().

◆ ED_view3d_clipping_local()

◆ ED_view3d_cursor3d_position()

◆ ED_view3d_cursor3d_position_rotation()

◆ ED_view3d_cursor3d_update()

◆ render_border_exec()

◆ toggle_shading_exec()

◆ toggle_xray_exec()

◆ view3d_camera_user_poll()

◆ view3d_center_camera_exec()

◆ view3d_center_lock_exec()

◆ view3d_clipping_exec()

◆ view3d_clipping_invoke()

◆ view3d_cursor3d_invoke()

◆ view3d_lock_poll()

bool view3d_lock_poll ( bContext * C)
static

◆ view3d_navigate_invoke()

wmOperatorStatus view3d_navigate_invoke ( bContext * C,
wmOperator * ,
const wmEvent * event )
static

◆ VIEW3D_OT_camera_background_image_add()

◆ VIEW3D_OT_camera_background_image_remove()

void VIEW3D_OT_camera_background_image_remove ( wmOperatorType * ot)

◆ VIEW3D_OT_clear_render_border()

void VIEW3D_OT_clear_render_border ( wmOperatorType * ot)

◆ VIEW3D_OT_clip_border()

◆ VIEW3D_OT_cursor3d()

◆ VIEW3D_OT_drop_world()

void VIEW3D_OT_drop_world ( wmOperatorType * ot)

◆ VIEW3D_OT_navigate()

void VIEW3D_OT_navigate ( wmOperatorType * ot)

Definition at line 552 of file view3d_edit.cc.

References ED_operator_view3d_active(), ot, and view3d_navigate_invoke().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_render_border()

◆ VIEW3D_OT_toggle_shading()

◆ VIEW3D_OT_toggle_xray()

void VIEW3D_OT_toggle_xray ( wmOperatorType * ot)

Definition at line 1251 of file view3d_edit.cc.

References ED_operator_view3d_active(), ot, and toggle_xray_exec().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_view_center_camera()

void VIEW3D_OT_view_center_camera ( wmOperatorType * ot)

Definition at line 207 of file view3d_edit.cc.

References ot, view3d_camera_user_poll(), and view3d_center_camera_exec().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_view_center_lock()

void VIEW3D_OT_view_center_lock ( wmOperatorType * ot)

Definition at line 239 of file view3d_edit.cc.

References ot, view3d_center_lock_exec(), and view3d_lock_poll().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_view_lock_clear()

void VIEW3D_OT_view_lock_clear ( wmOperatorType * ot)

Definition at line 97 of file view3d_edit.cc.

References ED_operator_region_view3d_active(), ot, and view_lock_clear_exec().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_view_lock_to_active()

void VIEW3D_OT_view_lock_to_active ( wmOperatorType * ot)

Definition at line 154 of file view3d_edit.cc.

References ED_operator_region_view3d_active(), ot, and view_lock_to_active_exec().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_view_persportho()

void VIEW3D_OT_view_persportho ( wmOperatorType * ot)

Definition at line 508 of file view3d_edit.cc.

References ED_operator_rv3d_user_region_poll(), ot, and viewpersportho_exec().

Referenced by view3d_operatortypes().

◆ VIEW3D_OT_zoom_camera_1_to_1()

void VIEW3D_OT_zoom_camera_1_to_1 ( wmOperatorType * ot)

Definition at line 460 of file view3d_edit.cc.

References ot, view3d_camera_user_poll(), and view3d_zoom_1_to_1_camera_exec().

Referenced by view3d_operatortypes().

◆ view3d_set_1_to_1_viewborder()

void view3d_set_1_to_1_viewborder ( Scene * scene,
Depsgraph * depsgraph,
ARegion * region,
View3D * v3d )
static

◆ view3d_zoom_1_to_1_camera_exec()

◆ view_lock_clear_exec()

◆ view_lock_to_active_exec()

◆ viewpersportho_exec()

Variable Documentation

◆ prop_shading_type_items

const EnumPropertyItem prop_shading_type_items[]
static
Initial value:
= {
{OB_WIRE, "WIREFRAME", 0, "Wireframe", "Toggle wireframe shading"},
{OB_SOLID, "SOLID", 0, "Solid", "Toggle solid shading"},
{OB_MATERIAL, "MATERIAL", 0, "Material Preview", "Toggle material preview shading"},
{OB_RENDER, "RENDERED", 0, "Rendered", "Toggle rendered shading"},
{0, nullptr, 0, nullptr, nullptr},
}
@ OB_WIRE
@ OB_SOLID
@ OB_RENDER
@ OB_MATERIAL

Definition at line 1149 of file view3d_edit.cc.

Referenced by VIEW3D_OT_toggle_shading().