|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | ViewContext |
| struct | ViewDepths |
Macros | |
| #define | IS_CLIPPED 12000 |
| #define | V3D_PROJ_TEST_CLIP_DEFAULT (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) |
| #define | V3D_PROJ_TEST_ALL (V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_FAR | V3D_PROJ_TEST_CLIP_ZERO) |
| #define | MAXPICKELEMS 2500 |
| #define | MAXPICKBUF (4 * MAXPICKELEMS) |
| #define | ED_view3d_clear_mats_rv3d(rv3d) (void)(rv3d) |
| #define | ED_view3d_check_mats_rv3d(rv3d) (void)(rv3d) |
| #define | VIEW3D_MARGIN 1.4f |
| #define | VIEW3D_DIST_FALLBACK 1.0f |
| #define | XRAY_ALPHA(v3d) (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) |
| #define | XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY) |
| #define | XRAY_FLAG_ENABLED(v3d) (((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) |
| #define | XRAY_ENABLED(v3d) (XRAY_FLAG_ENABLED(v3d) && (XRAY_ALPHA(v3d) < 1.0f)) |
| #define | XRAY_ACTIVE(v3d) (XRAY_ENABLED(v3d) && ((v3d)->shading.type < OB_MATERIAL)) |
Typedefs | |
| typedef struct ViewContext | ViewContext |
| typedef struct ViewDepths | ViewDepths |
Enumerations | |
| enum | eV3DCursorOrient { V3D_CURSOR_ORIENT_NONE = 0 , V3D_CURSOR_ORIENT_VIEW , V3D_CURSOR_ORIENT_XFORM , V3D_CURSOR_ORIENT_GEOM } |
| enum | eV3DDepthOverrideMode { V3D_DEPTH_NO_GPENCIL = 0 , V3D_DEPTH_GPENCIL_ONLY , V3D_DEPTH_OBJECT_ONLY } |
| enum | eV3DProjStatus { V3D_PROJ_RET_OK = 0 , V3D_PROJ_RET_CLIP_NEAR = 1 , V3D_PROJ_RET_CLIP_FAR = 2 , V3D_PROJ_RET_CLIP_ZERO = 3 , V3D_PROJ_RET_CLIP_BB = 4 , V3D_PROJ_RET_CLIP_WIN = 5 , V3D_PROJ_RET_OVERFLOW = 6 } |
| enum | eV3DProjTest { V3D_PROJ_TEST_NOP = 0 , V3D_PROJ_TEST_CLIP_BB = (1 << 0) , V3D_PROJ_TEST_CLIP_WIN = (1 << 1) , V3D_PROJ_TEST_CLIP_NEAR = (1 << 2) , V3D_PROJ_TEST_CLIP_FAR = (1 << 3) , V3D_PROJ_TEST_CLIP_ZERO = (1 << 4) } |
| enum | eV3DSelectMode { VIEW3D_SELECT_ALL = 0 , VIEW3D_SELECT_PICK_ALL = 1 , VIEW3D_SELECT_PICK_NEAREST = 2 } |
| enum | eV3DSelectObjectFilter { VIEW3D_SELECT_FILTER_NOP = 0 , VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK = 1 , VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK = 2 } |
Functions | |
| void | ED_view3d_background_color_get (const struct Scene *scene, const struct View3D *v3d, float r_color[3]) |
| bool | ED_view3d_has_workbench_in_texture_color (const struct Scene *scene, const struct Object *ob, const struct View3D *v3d) |
| void | ED_view3d_cursor3d_position (struct bContext *C, const int mval[2], const bool use_depth, float r_cursor_co[3]) |
| void | ED_view3d_cursor3d_position_rotation (struct 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 (struct bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation) |
| struct Camera * | ED_view3d_camera_data_get (struct View3D *v3d, struct RegionView3D *rv3d) |
| void | ED_view3d_to_m4 (float mat[4][4], const float ofs[3], const float quat[4], const float dist) |
| void | ED_view3d_from_m4 (const float mat[4][4], float ofs[3], float quat[4], const float *dist) |
| void | ED_view3d_from_object (const struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens) |
| void | ED_view3d_to_object (const struct Depsgraph *depsgraph, struct Object *ob, const float ofs[3], const float quat[4], const float dist) |
| bool | ED_view3d_camera_to_view_selected (struct Main *bmain, struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *camera_ob) |
| void | ED_view3d_lastview_store (struct RegionView3D *rv3d) |
| void | ED_view3d_depth_override (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, bool update_cache) |
| bool | ED_view3d_depth_read_cached (const ViewDepths *vd, const int mval[2], int margin, float *r_depth) |
| bool | ED_view3d_depth_read_cached_normal (const ViewContext *vc, const int mval[2], float r_normal[3]) |
| bool | ED_view3d_depth_unproject (const struct ARegion *region, const int mval[2], const double depth, float r_location_world[3]) |
| void | ED_view3d_depth_tag_update (struct RegionView3D *rv3d) |
| void | meshobject_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct MVert *eve, const float screen_co[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | mesh_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct BMVert *eve, const float screen_co[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | mesh_foreachScreenEdge (struct ViewContext *vc, void(*func)(void *userData, struct BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | mesh_foreachScreenEdge_clip_bb_segment (struct ViewContext *vc, void(*func)(void *userData, struct BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | mesh_foreachScreenFace (struct ViewContext *vc, void(*func)(void *userData, struct BMFace *efa, const float screen_co[2], int index), void *userData, const eV3DProjTest clip_flag) |
| void | nurbs_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, bool handle_visible, const float screen_co[2]), void *userData, const eV3DProjTest clip_flag) |
| void | mball_foreachScreenElem (struct ViewContext *vc, void(*func)(void *userData, struct MetaElem *ml, const float screen_co[2]), void *userData, const eV3DProjTest clip_flag) |
| void | lattice_foreachScreenVert (struct ViewContext *vc, void(*func)(void *userData, struct BPoint *bp, const float screen_co[2]), void *userData, const eV3DProjTest clip_flag) |
| void | armature_foreachScreenBone (struct ViewContext *vc, void(*func)(void *userData, struct EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| void | pose_foreachScreenBone (struct ViewContext *vc, void(*func)(void *userData, struct bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]), void *userData, const eV3DProjTest clip_flag) |
| void | ED_view3d_project_float_v2_m4 (const struct ARegion *region, const float co[3], float r_co[2], float mat[4][4]) |
| void | ED_view3d_project_float_v3_m4 (const struct ARegion *region, const float co[3], float r_co[3], float mat[4][4]) |
| eV3DProjStatus | ED_view3d_project_base (const struct ARegion *region, struct Base *base) |
| eV3DProjStatus | ED_view3d_project_short_ex (const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], short r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_short_global (const struct ARegion *region, const float co[3], short r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_short_object (const struct ARegion *region, const float co[3], short r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_ex (const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], int r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_global (const struct ARegion *region, const float co[3], int r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_object (const struct ARegion *region, const float co[3], int r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_ex (const struct ARegion *region, float perspmat[4][4], const bool is_local, const float co[3], float r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_global (const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_object (const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag) |
| float | ED_view3d_pixel_size (const struct RegionView3D *rv3d, const float co[3]) |
| float | ED_view3d_pixel_size_no_ui_scale (const struct RegionView3D *rv3d, const float co[3]) |
| float | ED_view3d_calc_zfac (const struct RegionView3D *rv3d, const float co[3], bool *r_flip) |
| bool | ED_view3d_clip_segment (const struct RegionView3D *rv3d, float ray_start[3], float ray_end[3]) |
| bool | ED_view3d_win_to_ray_clipped (struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const float mval[2], float ray_start[3], float ray_normal[3], const bool do_clip) |
| bool | ED_view3d_win_to_ray_clipped_ex (struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const float mval[2], float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip) |
| void | ED_view3d_win_to_ray (const struct ARegion *region, const float mval[2], float r_ray_start[3], float r_ray_normal[3]) |
| void | ED_view3d_global_to_vector (const struct RegionView3D *rv3d, const float coord[3], float vec[3]) |
| void | ED_view3d_win_to_3d (const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3]) |
| void | ED_view3d_win_to_3d_int (const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane (const struct ARegion *region, const float plane[4], const float mval[2], const bool do_clip, float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane_with_fallback (const struct ARegion *region, const float plane[4], const float mval[2], const bool do_clip, const float plane_fallback[4], float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane_int (const struct ARegion *region, const float plane[4], const int mval[2], const bool do_clip, float r_out[3]) |
| void | ED_view3d_win_to_delta (const struct ARegion *region, const float mval[2], float out[3], const float zfac) |
| void | ED_view3d_win_to_origin (const struct ARegion *region, const float mval[2], float out[3]) |
| void | ED_view3d_win_to_vector (const struct ARegion *region, const float mval[2], float out[3]) |
| bool | ED_view3d_win_to_segment_clipped (struct Depsgraph *depsgraph, const struct ARegion *region, struct View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], const bool do_clip) |
| void | ED_view3d_ob_project_mat_get (const struct RegionView3D *v3d, struct Object *ob, float r_pmat[4][4]) |
| void | ED_view3d_ob_project_mat_get_from_obmat (const struct RegionView3D *rv3d, const float obmat[4][4], float r_pmat[4][4]) |
| void | ED_view3d_project (const struct ARegion *region, const float world[3], float r_region_co[3]) |
| bool | ED_view3d_unproject (const struct ARegion *region, float regionx, float regiony, float regionz, float world[3]) |
| void | ED_view3d_dist_range_get (const struct View3D *v3d, float r_dist_range[2]) |
| bool | ED_view3d_clip_range_get (struct Depsgraph *depsgraph, const struct View3D *v3d, const struct RegionView3D *rv3d, float *r_clipsta, float *r_clipend, const bool use_ortho_factor) |
| bool | ED_view3d_viewplane_get (struct Depsgraph *depsgraph, const struct View3D *v3d, const struct RegionView3D *rv3d, int winxi, int winyi, struct rctf *r_viewplane, float *r_clipsta, float *r_clipend, float *r_pixsize) |
| void | ED_view3d_polygon_offset (const struct RegionView3D *rv3d, const float dist) |
| void | ED_view3d_calc_camera_border (const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, struct rctf *r_viewborder, const bool no_shift) |
| void | ED_view3d_calc_camera_border_size (const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, float r_size[2]) |
| bool | ED_view3d_calc_render_border (const struct Scene *scene, struct Depsgraph *depsgraph, struct View3D *v3d, struct ARegion *region, struct rcti *rect) |
| void | ED_view3d_clipping_calc_from_boundbox (float clip[6][4], const struct BoundBox *clipbb, const bool is_flip) |
| void | ED_view3d_clipping_calc (struct BoundBox *bb, float planes[4][4], const struct ARegion *region, const struct Object *ob, const struct rcti *rect) |
| bool | ED_view3d_clipping_clamp_minmax (const struct RegionView3D *rv3d, float min[3], float max[3]) |
| void | ED_view3d_clipping_local (struct RegionView3D *rv3d, const float mat[4][4]) |
| bool | ED_view3d_clipping_test (const struct RegionView3D *rv3d, const float co[3], const bool is_local) |
| float | ED_view3d_radius_to_dist_persp (const float angle, const float radius) |
| float | ED_view3d_radius_to_dist_ortho (const float lens, const float radius) |
| float | ED_view3d_radius_to_dist (const struct View3D *v3d, const struct ARegion *region, const struct Depsgraph *depsgraph, const char persp, const bool use_aspect, const float radius) |
| void | imm_drawcircball (const float cent[3], float rad, const float tmat[4][4], unsigned int pos) |
| void | ED_view3d_backbuf_depth_validate (struct ViewContext *vc) |
| int | ED_view3d_backbuf_sample_size_clamp (struct ARegion *region, const float dist) |
| void | ED_view3d_select_id_validate (struct ViewContext *vc) |
| bool | ED_view3d_autodist (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], const bool alphaoverride, const float fallback_depth_pt[3]) |
| bool | ED_view3d_autodist_simple (struct ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth) |
| bool | ED_view3d_autodist_depth (struct ARegion *region, const int mval[2], int margin, float *depth) |
| bool | ED_view3d_autodist_depth_seg (struct ARegion *region, const int mval_sta[2], const int mval_end[2], int margin, float *depth) |
| eV3DSelectObjectFilter | ED_view3d_select_filter_from_mode (const struct Scene *scene, const struct Object *obact) |
| void | view3d_opengl_select_cache_begin (void) |
| void | view3d_opengl_select_cache_end (void) |
| int | view3d_opengl_select (struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const struct rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter) |
| int | view3d_opengl_select_with_id_filter (struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const struct rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, uint select_id) |
| float | ED_view3d_select_dist_px (void) |
| void | ED_view3d_viewcontext_init (struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph) |
| void | ED_view3d_viewcontext_init_object (struct ViewContext *vc, struct Object *obact) |
| void | view3d_operator_needs_opengl (const struct bContext *C) |
| void | view3d_region_operator_needs_opengl (struct wmWindow *win, struct ARegion *region) |
| bool | edge_inside_circle (const float cent[2], float radius, const float screen_co_a[2], const float screen_co_b[2]) |
| struct RegionView3D * | ED_view3d_context_rv3d (struct bContext *C) |
| bool | ED_view3d_context_user_region (struct bContext *C, struct View3D **r_v3d, struct ARegion **r_region) |
| bool | ED_view3d_area_user_region (const struct ScrArea *area, const struct View3D *v3d, struct ARegion **r_region) |
| bool | ED_operator_rv3d_user_region_poll (struct bContext *C) |
| void | ED_view3d_init_mats_rv3d (struct Object *ob, struct RegionView3D *rv3d) |
| void | ED_view3d_init_mats_rv3d_gl (struct Object *ob, struct RegionView3D *rv3d) |
| struct RV3DMatrixStore * | ED_view3d_mats_rv3d_backup (struct RegionView3D *rv3d) |
| void | ED_view3d_mats_rv3d_restore (struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat) |
| void | ED_draw_object_facemap (struct Depsgraph *depsgraph, struct Object *ob, const float col[4], const int facemap) |
| struct RenderEngineType * | ED_view3d_engine_type (const struct Scene *scene, int drawtype) |
| bool | ED_view3d_context_activate (struct bContext *C) |
| void | ED_view3d_draw_setup_view (const struct wmWindowManager *wm, struct wmWindow *win, struct Depsgraph *depsgraph, struct Scene *scene, struct ARegion *region, struct View3D *v3d, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect) |
| struct Base * | ED_view3d_give_base_under_cursor (struct bContext *C, const int mval[2]) |
| struct Object * | ED_view3d_give_object_under_cursor (struct bContext *C, const int mval[2]) |
| bool | ED_view3d_is_object_under_cursor (struct bContext *C, const int mval[2]) |
| void | ED_view3d_quadview_update (struct ScrArea *area, struct ARegion *region, bool do_clip) |
| void | ED_view3d_update_viewmat (struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, struct ARegion *region, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect, bool offscreen) |
| bool | ED_view3d_quat_from_axis_view (const char view, const char view_axis_roll, float r_quat[4]) |
| bool | ED_view3d_quat_to_axis_view (const float viewquat[4], const float epsilon, char *r_view, char *r_view_axis_rotation) |
| char | ED_view3d_lock_view_from_index (int index) |
| char | ED_view3d_axis_view_opposite (char view) |
| bool | ED_view3d_lock (struct RegionView3D *rv3d) |
| void | ED_view3d_datamask (const struct bContext *C, const struct Scene *scene, const struct View3D *v3d, struct CustomData_MeshMasks *r_cddata_masks) |
| void | ED_view3d_screen_datamask (const struct bContext *C, const struct Scene *scene, const struct bScreen *screen, struct CustomData_MeshMasks *r_cddata_masks) |
| bool | ED_view3d_offset_lock_check (const struct View3D *v3d, const struct RegionView3D *rv3d) |
| void | ED_view3d_persp_switch_from_camera (const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d, const char persp) |
| bool | ED_view3d_persp_ensure (const struct Depsgraph *depsgraph, struct View3D *v3d, struct ARegion *region) |
| bool | ED_view3d_camera_lock_check (const struct View3D *v3d, const struct RegionView3D *rv3d) |
| void | ED_view3d_camera_lock_init_ex (const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist) |
| void | ED_view3d_camera_lock_init (const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d) |
| bool | ED_view3d_camera_lock_sync (const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d) |
| bool | ED_view3d_camera_autokey (const struct Scene *scene, struct ID *id_key, struct bContext *C, const bool do_rotate, const bool do_translate) |
| bool | ED_view3d_camera_lock_autokey (struct View3D *v3d, struct RegionView3D *rv3d, struct bContext *C, const bool do_rotate, const bool do_translate) |
| void | ED_view3d_lock_clear (struct View3D *v3d) |
| float | ED_view3d_offset_distance (const float mat[4][4], const float ofs[3], const float fallback_dist) |
| void | ED_view3d_distance_set (struct RegionView3D *rv3d, const float dist) |
| bool | ED_view3d_distance_set_from_location (struct RegionView3D *rv3d, const float dist_co[3], const float dist_min) |
| float | ED_scene_grid_scale (const struct Scene *scene, const char **r_grid_unit) |
| float | ED_view3d_grid_scale (const struct Scene *scene, struct View3D *v3d, const char **r_grid_unit) |
| void | ED_view3d_grid_steps (const struct Scene *scene, struct View3D *v3d, struct RegionView3D *rv3d, float *r_grid_steps) |
| float | ED_view3d_grid_view_scale (struct Scene *scene, struct View3D *v3d, struct ARegion *region, const char **r_grid_unit) |
| void | ED_scene_draw_fps (const struct Scene *scene, int xoffset, int *yoffset) |
| void | ED_view3d_stop_render_preview (struct wmWindowManager *wm, struct ARegion *region) |
| void | ED_view3d_shade_update (struct Main *bmain, struct View3D *v3d, struct ScrArea *area) |
| void | ED_view3d_draw_bgpic_test (const struct Scene *scene, struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const bool do_foreground, const bool do_camera_frame) |
| void | ED_view3d_gizmo_mesh_preselect_get_active (struct bContext *C, struct wmGizmo *gz, struct Base **r_base, struct BMElem **r_ele) |
| void | ED_view3d_buttons_region_layout_ex (const struct bContext *C, struct ARegion *region, const char *category_override) |
| bool | ED_view3d_local_collections_set (struct Main *bmain, struct View3D *v3d) |
| void | ED_view3d_local_collections_reset (struct bContext *C, const bool reset_all) |
| #define ED_view3d_check_mats_rv3d | ( | rv3d | ) | (void)(rv3d) |
Definition at line 583 of file ED_view3d.h.
| #define ED_view3d_clear_mats_rv3d | ( | rv3d | ) | (void)(rv3d) |
Definition at line 582 of file ED_view3d.h.
| #define IS_CLIPPED 12000 |
Definition at line 172 of file ED_view3d.h.
| #define MAXPICKBUF (4 * MAXPICKELEMS) |
Definition at line 511 of file ED_view3d.h.
| #define MAXPICKELEMS 2500 |
Definition at line 510 of file ED_view3d.h.
| #define V3D_PROJ_TEST_ALL (V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_FAR | V3D_PROJ_TEST_CLIP_ZERO) |
Definition at line 203 of file ED_view3d.h.
| #define V3D_PROJ_TEST_CLIP_DEFAULT (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) |
Definition at line 201 of file ED_view3d.h.
| #define VIEW3D_DIST_FALLBACK 1.0f |
Definition at line 676 of file ED_view3d.h.
| #define VIEW3D_MARGIN 1.4f |
Definition at line 675 of file ED_view3d.h.
| #define XRAY_ACTIVE | ( | v3d | ) | (XRAY_ENABLED(v3d) && ((v3d)->shading.type < OB_MATERIAL)) |
Definition at line 711 of file ED_view3d.h.
| #define XRAY_ALPHA | ( | v3d | ) | (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha) |
Definition at line 705 of file ED_view3d.h.
| #define XRAY_ENABLED | ( | v3d | ) | (XRAY_FLAG_ENABLED(v3d) && (XRAY_ALPHA(v3d) < 1.0f)) |
Definition at line 710 of file ED_view3d.h.
| #define XRAY_FLAG | ( | v3d | ) | (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY) |
Definition at line 707 of file ED_view3d.h.
| #define XRAY_FLAG_ENABLED | ( | v3d | ) | (((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) |
Definition at line 709 of file ED_view3d.h.
| typedef struct ViewContext ViewContext |
| typedef struct ViewDepths ViewDepths |
| enum eV3DCursorOrient |
| Enumerator | |
|---|---|
| V3D_CURSOR_ORIENT_NONE | |
| V3D_CURSOR_ORIENT_VIEW | |
| V3D_CURSOR_ORIENT_XFORM | |
| V3D_CURSOR_ORIENT_GEOM | |
Definition at line 98 of file ED_view3d.h.
| Enumerator | |
|---|---|
| V3D_DEPTH_NO_GPENCIL | |
| V3D_DEPTH_GPENCIL_ONLY | |
| V3D_DEPTH_OBJECT_ONLY | |
Definition at line 147 of file ED_view3d.h.
| enum eV3DProjStatus |
Definition at line 175 of file ED_view3d.h.
| enum eV3DProjTest |
| Enumerator | |
|---|---|
| V3D_PROJ_TEST_NOP | |
| V3D_PROJ_TEST_CLIP_BB | |
| V3D_PROJ_TEST_CLIP_WIN | |
| V3D_PROJ_TEST_CLIP_NEAR | |
| V3D_PROJ_TEST_CLIP_FAR | |
| V3D_PROJ_TEST_CLIP_ZERO | |
Definition at line 192 of file ED_view3d.h.
| enum eV3DSelectMode |
| Enumerator | |
|---|---|
| VIEW3D_SELECT_ALL | |
| VIEW3D_SELECT_PICK_ALL | |
| VIEW3D_SELECT_PICK_NEAREST | |
Definition at line 513 of file ED_view3d.h.
| Enumerator | |
|---|---|
| VIEW3D_SELECT_FILTER_NOP | Don't exclude anything. |
| VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK | Don't select objects outside the current mode. |
| VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK | A version of VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK that allows pose-bone selection. |
Definition at line 522 of file ED_view3d.h.
| void armature_foreachScreenBone | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 549 of file view3d_iterators.c.
References Object::data, EBONE_VISIBLE, ED_view3d_check_mats_rv3d, ED_view3d_project_float_object(), bArmature::edbo, ListBase::first, EditBone::head, IS_CLIPPED, EditBone::next, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, EditBone::tail, and V3D_PROJ_RET_OK.
Referenced by armature_circle_select(), and do_lasso_select_armature().
| void ED_draw_object_facemap | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob, | ||
| const float | col[4], | ||
| const int | facemap | ||
| ) |
Definition at line 110 of file drawobject.c.
References MLoopTri_Store::array, BKE_object_get_evaluated_mesh(), CD_FACEMAP, MVert::co, col, copy_v3_v3(), CustomData_get_layer(), Object::data, DEG_get_evaluated_object(), depsgraph, facemap, GPU_batch_create, GPU_batch_discard(), GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_front_facing(), GPU_PRIM_TRIS, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_data_resize(), GPU_vertbuf_discard(), GPU_vertbuf_raw_step(), GPU_vertformat_attr_add(), GPUBatch, MPoly::loopstart, Mesh_Runtime::looptris, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, OB_MESH, OB_NEG_SCALE, poly_to_tri_count(), Mesh::runtime, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Object::transflag, MLoopTri::tri, Object::type, and MLoop::v.
Referenced by ED_gizmo_draw_preset_facemap().
| bool ED_operator_rv3d_user_region_poll | ( | struct bContext * | C | ) |
Definition at line 684 of file view3d_view.c.
References C, and ED_view3d_context_user_region().
Referenced by VIEW3D_OT_object_as_camera(), VIEW3D_OT_view_axis(), VIEW3D_OT_view_camera(), VIEW3D_OT_view_orbit(), VIEW3D_OT_view_persportho(), and VIEW3D_OT_view_roll().
| void ED_scene_draw_fps | ( | const struct Scene * | scene, |
| int | xoffset, | ||
| int * | yoffset | ||
| ) |
Referenced by sequencer_preview_region_draw().
| bool ED_view3d_area_user_region | ( | const struct ScrArea * | area, |
| const struct View3D * | v3d, | ||
| struct ARegion ** | r_region | ||
| ) |
| bool ED_view3d_autodist_depth | ( | struct ARegion * | region, |
| const int | mval[2], | ||
| int | margin, | ||
| float * | depth | ||
| ) |
Definition at line 1097 of file view3d_utils.c.
References view_autodist_depth_margin().
Referenced by annotation_stroke_newfrombuffer(), gpencil_get_depth_array(), gpencil_primitive_update_strokes(), and gpencil_stroke_newfrombuffer().
| bool ED_view3d_autodist_depth_seg | ( | struct ARegion * | region, |
| const int | mval_sta[2], | ||
| const int | mval_end[2], | ||
| int | margin, | ||
| float * | depth | ||
| ) |
Definition at line 1126 of file view3d_utils.c.
References BLI_bitmap_draw_2d_line_v2v2i(), copy_v2_v2_int(), data, depth_segment_cb(), and NULL.
Referenced by annotation_stroke_newfrombuffer(), gpencil_get_depth_array(), gpencil_primitive_update_strokes(), and gpencil_stroke_newfrombuffer().
| bool ED_view3d_autodist_simple | ( | struct ARegion * | region, |
| const int | mval[2], | ||
| float | mouse_worldloc[3], | ||
| int | margin, | ||
| const float * | force_depth | ||
| ) |
Definition at line 1073 of file view3d_utils.c.
References ED_view3d_unproject(), float(), and view_autodist_depth_margin().
Referenced by annotation_stroke_convertcoords(), annotation_stroke_eraser_is_occluded(), gpencil_stroke_convertcoords(), gpencil_stroke_convertcoords_tpoint(), gpencil_stroke_eraser_is_occluded(), and object_transfer_mode_reposition_view_pivot().
| char ED_view3d_axis_view_opposite | ( | char | view | ) |
Definition at line 1466 of file view3d_utils.c.
References RV3D_VIEW_BACK, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_LEFT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, RV3D_VIEW_USER, and view.
Referenced by vieworbit_exec().
| void ED_view3d_backbuf_depth_validate | ( | struct ViewContext * | vc | ) |
allow for small values [0.5 - 2.5], and large values, FLT_MAX by clamping by the area size
Definition at line 2201 of file view3d_draw.c.
References ceilf, max_ii(), min_ff(), and ARegion::winx.
Referenced by EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), and EDBM_vert_find_nearest_ex().
| void ED_view3d_background_color_get | ( | const struct Scene * | scene, |
| const struct View3D * | v3d, | ||
| float | r_color[3] | ||
| ) |
Referenced by gizmo_axis_draw(), GPENCIL_draw_scene(), and OVERLAY_fade_cache_init().
| void ED_view3d_buttons_region_layout_ex | ( | const struct bContext * | C, |
| struct ARegion * | region, | ||
| const char * | category_override | ||
| ) |
Referenced by buttons_main_region_layout().
| void ED_view3d_calc_camera_border | ( | const struct Scene * | scene, |
| struct Depsgraph * | depsgraph, | ||
| const struct ARegion * | region, | ||
| const struct View3D * | v3d, | ||
| const struct RegionView3D * | rv3d, | ||
| struct rctf * | r_viewborder, | ||
| const bool | no_shift | ||
| ) |
Referenced by annotation_paint_initstroke(), drawFlyPixel(), drawWalkPixel(), ED_annotation_draw_view3d(), gpencil_camera_view_subrect(), gpencil_paint_initstroke(), gpencil_point_conversion_init(), initFlyInfo(), blender::io::gpencil::GpencilIO::prepare_camera_params(), render_border_exec(), view_zoom_to_window_xy_camera(), and WIDGETGROUP_camera_view_draw_prepare().
| void ED_view3d_calc_camera_border_size | ( | const struct Scene * | scene, |
| struct Depsgraph * | depsgraph, | ||
| const struct ARegion * | region, | ||
| const struct View3D * | v3d, | ||
| const struct RegionView3D * | rv3d, | ||
| float | r_size[2] | ||
| ) |
Referenced by view3d_center_camera_exec(), and view3d_set_1_to_1_viewborder().
| bool ED_view3d_calc_render_border | ( | const struct Scene * | scene, |
| struct Depsgraph * | depsgraph, | ||
| struct View3D * | v3d, | ||
| struct ARegion * | region, | ||
| struct rcti * | rect | ||
| ) |
Referenced by wm_region_test_render_do_draw().
| float ED_view3d_calc_zfac | ( | const struct RegionView3D * | rv3d, |
| const float | co[3], | ||
| bool * | r_flip | ||
| ) |
Referenced by annotation_stroke_convertcoords(), brush_edit_init(), calc_local_y(), calculateCenter(), blender::io::gpencil::GpencilIO::create_object_list(), drawVertSlide(), ED_view3d_cursor3d_position(), gpencil_brush_calc_midpoint(), gpencil_brush_grab_calc_dvec(), gpencil_brush_randomize_apply(), gpencil_point_xy_to_3d(), gpencil_stroke_convertcoords(), gpencil_stroke_convertcoords_tpoint(), mesh_bisect_interactive_calc(), move3d_get_translate(), paint_calc_object_space_radius(), view3d_point_depth(), view3d_zoom_border_exec(), view_zoom_to_window_xy_3d(), and viewops_data_create().
| bool ED_view3d_camera_autokey | ( | const struct Scene * | scene, |
| struct ID * | id_key, | ||
| struct bContext * | C, | ||
| const bool | do_rotate, | ||
| const bool | do_translate | ||
| ) |
Referenced by ED_view3d_cameracontrol_update().
| struct Camera* ED_view3d_camera_data_get | ( | struct View3D * | v3d, |
| struct RegionView3D * | rv3d | ||
| ) |
Definition at line 109 of file view3d_utils.c.
References View3D::camera, Object::data, NULL, OB_CAMERA, RegionView3D::persp, RV3D_CAMOB, and Object::type.
Referenced by uv_from_view_exec(), and uv_from_view_invoke().
| bool ED_view3d_camera_lock_autokey | ( | View3D * | v3d, |
| RegionView3D * | rv3d, | ||
| struct bContext * | C, | ||
| const bool | do_rotate, | ||
| const bool | do_translate | ||
| ) |
Call after modifying a locked view.
Definition at line 710 of file view3d_utils.c.
References C, View3D::camera, CTX_data_scene(), ED_view3d_camera_autokey(), ED_view3d_camera_lock_check(), Object::id, OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK, Object::parent, scene, and Object::transflag.
Referenced by view3d_smoothview_apply(), viewdolly_modal(), viewmove_modal(), viewroll_modal(), viewrotate_modal(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
| bool ED_view3d_camera_lock_check | ( | const struct View3D * | v3d, |
| const struct RegionView3D * | rv3d | ||
| ) |
| void ED_view3d_camera_lock_init | ( | const struct Depsgraph * | depsgraph, |
| struct View3D * | v3d, | ||
| struct RegionView3D * | rv3d | ||
| ) |
Referenced by ED_view3d_smooth_view_ex(), and viewops_data_create().
| void ED_view3d_camera_lock_init_ex | ( | const struct Depsgraph * | depsgraph, |
| struct View3D * | v3d, | ||
| struct RegionView3D * | rv3d, | ||
| const bool | calc_dist | ||
| ) |
| bool ED_view3d_camera_lock_sync | ( | const struct Depsgraph * | depsgraph, |
| struct View3D * | v3d, | ||
| struct RegionView3D * | rv3d | ||
| ) |
| bool ED_view3d_camera_to_view_selected | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| const struct Scene * | scene, | ||
| struct Object * | camera_ob | ||
| ) |
Referenced by object_preview_scene_create(), and view3d_camera_to_view_selected_exec().
| bool ED_view3d_clip_range_get | ( | struct Depsgraph * | depsgraph, |
| const struct View3D * | v3d, | ||
| const struct RegionView3D * | rv3d, | ||
| float * | r_clipsta, | ||
| float * | r_clipend, | ||
| const bool | use_ortho_factor | ||
| ) |
| bool ED_view3d_clip_segment | ( | const struct RegionView3D * | rv3d, |
| float | ray_start[3], | ||
| float | ray_end[3] | ||
| ) |
| void ED_view3d_clipping_calc_from_boundbox | ( | float | clip[6][4], |
| const struct BoundBox * | clipbb, | ||
| const bool | is_flip | ||
| ) |
Referenced by calc_local_clipping().
| bool ED_view3d_clipping_clamp_minmax | ( | const struct RegionView3D * | rv3d, |
| float | min[3], | ||
| float | max[3] | ||
| ) |
Referenced by view3d_all_exec(), and viewselected_exec().
| void ED_view3d_clipping_local | ( | struct RegionView3D * | rv3d, |
| const float | mat[4][4] | ||
| ) |
Definition at line 4921 of file view3d_edit.c.
References calc_local_clipping(), RegionView3D::clip_local, RegionView3D::clipbb, RegionView3D::rflag, and RV3D_CLIPPING.
Referenced by DRW_draw_depth_object(), ED_view3d_init_mats_rv3d(), lattice_foreachScreenVert(), mesh_foreachScreenEdge(), mesh_foreachScreenEdge_clip_bb_segment(), mesh_foreachScreenVert(), meshobject_foreachScreenVert(), nurbs_foreachScreenVert(), and project_paint_begin().
| bool ED_view3d_clipping_test | ( | const struct RegionView3D * | rv3d, |
| const float | co[3], | ||
| const bool | is_local | ||
| ) |
Referenced by ed_view3d_project__internal(), find_nearest_edge__doClosest(), knife_find_closest_edge_of_face(), knife_find_closest_vert_of_edge(), knife_sample_screen_density_from_closest_face(), point_is_visible(), project_paint_face_init(), project_paint_occlude_ptv_clip(), and sculpt_brush_test_clipping().
| bool ED_view3d_context_activate | ( | struct bContext * | C | ) |
Definition at line 244 of file view3d_utils.c.
References blender::compositor::area(), BKE_area_find_region_active_win(), BKE_screen_find_big_area(), C, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region_set(), CTX_wm_screen(), NULL, and SPACE_VIEW3D.
Referenced by screen_opengl_render_init().
| struct RegionView3D* ED_view3d_context_rv3d | ( | struct bContext * | C | ) |
Definition at line 89 of file space_view3d.c.
References blender::compositor::area(), BKE_area_find_region_active_win(), C, CTX_wm_area(), CTX_wm_region_view3d(), NULL, ARegion::regiondata, and SPACE_VIEW3D.
Referenced by clear_render_border_exec(), ED_curve_add_nurbs_primitive(), edbm_screw_invoke(), edbm_sort_elements_exec(), edbm_spin_invoke(), gizmo_mesh_bisect_update_from_op(), gizmo_mesh_spin_init_refresh(), gizmo_mesh_spin_redo_draw_prepare(), mesh_bisect_exec(), render_border_exec(), spin_exec(), and spin_invoke().
| bool ED_view3d_context_user_region | ( | struct bContext * | C, |
| struct View3D ** | r_v3d, | ||
| struct ARegion ** | r_region | ||
| ) |
Definition at line 107 of file space_view3d.c.
References blender::compositor::area(), C, CTX_wm_area(), CTX_wm_region(), ED_view3d_area_user_region(), if(), NULL, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_LOCK_ROTATION, SPACE_VIEW3D, and RegionView3D::viewlock.
Referenced by ED_operator_rv3d_user_region_poll(), region_quadview_exec(), screen_opengl_render_init(), view3d_camera_to_view_exec(), view3d_camera_to_view_poll(), view3d_camera_user_poll(), view3d_center_camera_exec(), view3d_setobjectascamera_exec(), view3d_zoom_1_to_1_camera_exec(), view_axis_exec(), view_camera_exec(), vieworbit_exec(), viewpersportho_exec(), and viewroll_exec().
| void ED_view3d_cursor3d_position | ( | struct bContext * | C, |
| const int | mval[2], | ||
| const bool | use_depth, | ||
| float | r_cursor_co[3] | ||
| ) |
Definition at line 4993 of file view3d_edit.c.
References C, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), CTX_wm_view3d(), depsgraph, ED_view3d_autodist(), ED_view3d_calc_zfac(), ED_view3d_win_to_3d_int(), negate_v3_v3(), NULL, RegionView3D::ofs, ARegion::regiondata, and view3d_operator_needs_opengl().
Referenced by collection_instance_add_exec(), ED_view3d_cursor3d_position_rotation(), empty_drop_named_image_invoke(), object_add_named_exec(), and object_data_instance_add_exec().
| void ED_view3d_cursor3d_position_rotation | ( | struct bContext * | C, |
| const int | mval[2], | ||
| const bool | use_depth, | ||
| enum eV3DCursorOrient | orientation, | ||
| float | r_cursor_co[3], | ||
| float | r_cursor_quat[4] | ||
| ) |
Definition at line 5035 of file view3d_edit.c.
References angle_normalized_qt(), axis_dominant_v3_ortho_single(), C, copy_qt_qt(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), dot_v3v3(), ED_transform_calc_orientation_from_type(), ED_transform_snap_object_context_create_view3d(), ED_transform_snap_object_context_destroy(), ED_transform_snap_object_project_view3d_ex(), ED_view3d_cursor3d_position(), mat3_to_quat(), mul_qt_qtqt(), mul_qt_v3(), negate_v3(), normalize_v3(), NULL, project_plane_v3_v3v3(), SnapObjectContext::region, ARegion::regiondata, rotation_between_vecs_to_quat(), SCE_SNAP_MODE_FACE, scene, SNAP_ALL, UNPACK2, SnapObjectContext::v3d, V3D_CURSOR_ORIENT_GEOM, V3D_CURSOR_ORIENT_NONE, V3D_CURSOR_ORIENT_VIEW, V3D_CURSOR_ORIENT_XFORM, and RegionView3D::viewquat.
Referenced by ED_view3d_cursor3d_update().
| void ED_view3d_cursor3d_update | ( | struct bContext * | C, |
| const int | mval[2], | ||
| const bool | use_depth, | ||
| enum eV3DCursorOrient | orientation | ||
| ) |
Definition at line 5151 of file view3d_edit.c.
References angle_signed_on_axis_v3v3_v3(), axis_angle_to_mat3(), BKE_scene_cursor_quat_to_rot(), BKE_scene_cursor_rot_to_quat(), C, copy_qt_qt(), CTX_data_scene(), CTX_wm_message_bus(), CTX_wm_region(), CTX_wm_view3d(), Scene::cursor, DEG_id_tag_update(), ED_view3d_cursor3d_position_rotation(), ED_view3d_project_float_global(), equals_v4v4(), Scene::id, ID_RECALC_COPY_ON_WRITE, View3D::localvd, View3DCursor::location, NA_EDITED, NC_SCENE, NC_SPACE, ND_SPACE_VIEW3D, negate_v3_v3(), View3D::ob_center_cursor, RegionView3D::ofs_lock, wmMsgParams_RNA::ptr, quat_to_mat3(), SnapObjectContext::region, ARegion::regiondata, RNA_pointer_create(), RNA_View3DCursor, ROT_MODE_AXISANGLE, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_mode, RV3D_VIEW_IS_AXIS, scene, USER_LOCK_CURSOR_ADJUST, SnapObjectContext::v3d, V3D_PROJ_RET_OK, V3D_PROJ_TEST_NOP, RegionView3D::view, ARegion::winx, ARegion::winy, WM_event_add_notifier(), WM_msg_publish_rna_params(), and zero_v2().
Referenced by edbm_point_normals_modal(), paintcurve_cursor_invoke(), and view3d_cursor3d_invoke().
| void ED_view3d_datamask | ( | const struct bContext * | C, |
| const struct Scene * | scene, | ||
| const struct View3D * | v3d, | ||
| struct CustomData_MeshMasks * | r_cddata_masks | ||
| ) |
Referenced by screen_opengl_render_init().
| void ED_view3d_depth_override | ( | Depsgraph * | depsgraph, |
| ARegion * | region, | ||
| View3D * | v3d, | ||
| Object * | obact, | ||
| eV3DDepthOverrideMode | mode, | ||
| bool | update_cache | ||
| ) |
Redraw the viewport depth buffer.
| mode | V3D_DEPTH_NO_GPENCIL - Redraw viewport without Grease Pencil and Annotations. V3D_DEPTH_GPENCIL_ONLY - Redraw viewport with Grease Pencil and Annotations only. V3D_DEPTH_OBJECT_ONLY - Redraw viewport with active object only. |
| update_cache | If true, store the entire depth buffer in #rv3d->depths. |
Definition at line 2331 of file view3d_draw.c.
References ViewDepths::damaged, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, RegionView3D::depths, DRW_draw_depth_loop(), DRW_draw_depth_loop_gpencil(), DRW_draw_depth_object(), ED_view3d_draw_setup_view(), View3D_Runtime::flag, View3D::flag, G_MAIN, NULL, ARegion::regiondata, RegionView3D::rflag, RGN_TYPE_WINDOW, View3D::runtime, RV3D_ZOFFSET_DISABLED, scene, SPACE_VIEW3D, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), V3D_DEPTH_GPENCIL_ONLY, V3D_DEPTH_NO_GPENCIL, V3D_DEPTH_OBJECT_ONLY, V3D_RUNTIME_DEPTHBUF_OVERRIDDEN, V3D_SELECT_OUTLINE, view3d_depth_cache_update(), WM_draw_region_get_viewport(), WM_draw_region_viewport_bind(), WM_draw_region_viewport_ensure(), and WM_draw_region_viewport_unbind().
Referenced by annotation_paint_strokeend(), annotation_stroke_addpoint(), annotation_stroke_doeraser(), curve_draw_invoke(), ED_view3d_autodist(), gpencil_get_depth_array(), gpencil_paint_strokeend(), gpencil_point_conversion_init(), gpencil_primitive_update_strokes(), gpencil_stroke_doeraser(), object_transform_axis_target_invoke(), PE_set_view3d_data(), and view3d_zoom_border_exec().
| bool ED_view3d_depth_read_cached | ( | const ViewDepths * | vd, |
| const int | mval[2], | ||
| int | margin, | ||
| float * | r_depth | ||
| ) |
Definition at line 1654 of file view3d_utils.c.
References BLI_array_iter_spiral_square, BLI_assert, data, ViewDepths::depth_range, depth_read_test_fn(), ViewDepths::depths, ViewDepths::h, max_ii(), min_ii(), ReadData::r_depth, ViewDepths::w, x, and y.
Referenced by ED_view3d_depth_read_cached_normal(), object_transform_axis_target_modal(), and stroke_elem_project().
| bool ED_view3d_depth_read_cached_normal | ( | const ViewContext * | vc, |
| const int | mval[2], | ||
| float | r_normal[3] | ||
| ) |
Definition at line 1697 of file view3d_utils.c.
References add_v3_v3(), cross(), cross_v3_v3v3(), ViewDepths::depth_range, RegionView3D::depths, double(), ED_view3d_depth_read_cached(), ED_view3d_depth_unproject(), normalize_v3(), ViewContext::region, ViewContext::rv3d, sub_v3_v3v3(), x, and y.
Referenced by curve_draw_event_add_first(), object_transform_axis_target_modal(), and stroke_elem_project().
| void ED_view3d_depth_tag_update | ( | struct RegionView3D * | rv3d | ) |
Definition at line 1764 of file view3d_utils.c.
References ViewDepths::damaged, and RegionView3D::depths.
Referenced by viewdolly_exec(), viewdolly_invoke(), viewdolly_modal(), viewmove_invoke(), viewmove_modal(), viewpan_invoke(), viewroll_invoke(), viewroll_modal(), viewrotate_invoke(), viewrotate_modal(), viewzoom_exec(), viewzoom_invoke(), and viewzoom_modal().
| bool ED_view3d_depth_unproject | ( | const struct ARegion * | region, |
| const int | mval[2], | ||
| const double | depth, | ||
| float | r_location_world[3] | ||
| ) |
Referenced by object_transform_axis_target_modal(), and stroke_elem_project().
Referenced by view3d_zoom_border_exec(), viewzoom_apply_3d(), and viewzoom_exec().
| void ED_view3d_distance_set | ( | RegionView3D * | rv3d, |
| const float | dist | ||
| ) |
Set the dist without moving the view (compensate with RegionView3D.ofs)
Definition at line 1312 of file view3d_utils.c.
References BLI_assert, copy_v3_fl3(), RegionView3D::dist, invert_qt_qt_normalized(), mul_mat3_m4_v3(), mul_qt_v3(), RegionView3D::ofs, sub_v3_v3(), RegionView3D::viewinv, and RegionView3D::viewquat.
Referenced by ED_view3d_cameracontrol_acquire(), and ED_view3d_cameracontrol_release().
| bool ED_view3d_distance_set_from_location | ( | RegionView3D * | rv3d, |
| const float | dist_co[3], | ||
| const float | dist_min | ||
| ) |
Change the distance & offset to match the depth of dist_co along the view axis.
| dist_co | A world-space location to use for the new depth. |
| dist_min | Resulting distances below this will be ignored. |
Definition at line 1339 of file view3d_utils.c.
References RegionView3D::dist, dot_v3v3(), invert_qt_qt_normalized(), madd_v3_v3fl(), mul_qt_v3(), negate_v3_v3(), RegionView3D::ofs, sub_v3_v3v3(), and RegionView3D::viewquat.
| void ED_view3d_draw_bgpic_test | ( | const struct Scene * | scene, |
| struct Depsgraph * | depsgraph, | ||
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const bool | do_foreground, | ||
| const bool | do_camera_frame | ||
| ) |
| struct RenderEngineType* ED_view3d_engine_type | ( | const struct Scene * | scene, |
| int | drawtype | ||
| ) |
Set the view transformation from a 4x4 matrix.
| mat | The view 4x4 transformation matrix to assign. |
| ofs | The view offset, normally from RegionView3D.ofs. |
| quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
| dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 1505 of file view3d_utils.c.
References BLI_assert, copy_m3_m4(), invert_qt_normalized(), madd_v3_v3fl(), mat3_normalized_to_quat(), negate_v3_v3(), normalize_m3(), and NULL.
Referenced by ED_view3d_from_object(), and object_apply_mat4_with_protect().
| void ED_view3d_from_object | ( | const struct Object * | ob, |
| float | ofs[3], | ||
| float | quat[4], | ||
| float * | dist, | ||
| float * | lens | ||
| ) |
Referenced by axis_set_view(), and ED_view3d_smooth_view_ex().
Definition at line 2163 of file view3d_select.c.
References BKE_object_update_select_id(), buffer, C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), depsgraph, ED_view3d_viewcontext_init(), ListBase::first, MAXPICKBUF, mixed_bones_object_selectbuffer(), mouse_select_eval_buffer(), NULL, ViewLayer::object_bases, selectbuffer_has_bones(), ViewContext::v3d, view3d_operator_needs_opengl(), VIEW3D_SELECT_FILTER_NOP, ViewContext::view_layer, and XRAY_ACTIVE.
Referenced by datadropper_id_sample_pt(), drop_named_material_invoke(), ED_view3d_give_object_under_cursor(), object_transfer_mode_invoke(), and object_transfer_mode_modal().
Definition at line 2189 of file view3d_select.c.
References C, ED_view3d_give_base_under_cursor(), NULL, and Base::object.
Referenced by ED_view3d_is_object_under_cursor(), empty_drop_named_image_invoke(), and view3d_ima_empty_drop_poll().
| void ED_view3d_gizmo_mesh_preselect_get_active | ( | struct bContext * | C, |
| struct wmGizmo * | gz, | ||
| struct Base ** | r_base, | ||
| struct BMElem ** | r_ele | ||
| ) |
Definition at line 457 of file view3d_gizmo_preselect_type.c.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_bases_in_edit_mode, BMEditMesh::bm, bm, BM_edge_at_index_find(), BM_face_at_index_find(), BM_vert_at_index_find(), C, CTX_data_view_layer(), CTX_wm_view3d(), MEM_freeN, NULL, Base::object, wmGizmo::ptr, RNA_int_get(), RNA_property_int_get(), and RNA_struct_find_property().
Referenced by edbm_preselect_or_active().
| void ED_view3d_global_to_vector | ( | const struct RegionView3D * | rv3d, |
| const float | coord[3], | ||
| float | vec[3] | ||
| ) |
| float ED_view3d_grid_scale | ( | const struct Scene * | scene, |
| struct View3D * | v3d, | ||
| const char ** | r_grid_unit | ||
| ) |
Referenced by ED_object_new_primitive_matrix(), object_camera_add_exec(), and WM_operator_view3d_unit_defaults().
| void ED_view3d_grid_steps | ( | const struct Scene * | scene, |
| struct View3D * | v3d, | ||
| struct RegionView3D * | rv3d, | ||
| float * | r_grid_steps | ||
| ) |
Referenced by OVERLAY_grid_init().
| float ED_view3d_grid_view_scale | ( | struct Scene * | scene, |
| struct View3D * | v3d, | ||
| struct ARegion * | region, | ||
| const char ** | r_grid_unit | ||
| ) |
Definition at line 917 of file view3d_draw.c.
References ARRAY_SIZE, B_UNIT_LENGTH, BKE_unit_display_name_get(), BKE_unit_system_get(), ED_view3d_grid_scale(), ED_view3d_grid_steps(), RegionView3D::is_persp, len, ARegion::regiondata, RV3D_VIEW_IS_AXIS, scene, ARegion::sizex, STEPS_LEN, UnitSettings::system, Scene::unit, RegionView3D::view, and RegionView3D::winmat.
Referenced by draw_grid_unit_name(), gpencil_snap_to_grid(), idp_snap_calc_incremental(), initSnapSpatial(), snap_curs_to_grid_exec(), and snap_sel_to_grid_exec().
| bool ED_view3d_has_workbench_in_texture_color | ( | const struct Scene * | scene, |
| const struct Object * | ob, | ||
| const struct View3D * | v3d | ||
| ) |
Referenced by has_workbench_in_texture_color().
| void ED_view3d_init_mats_rv3d | ( | struct Object * | ob, |
| struct RegionView3D * | rv3d | ||
| ) |
Definition at line 190 of file space_view3d.c.
References ED_view3d_clipping_local(), mul_m4_m4m4(), Object::obmat, RegionView3D::persmat, RegionView3D::persmatob, RegionView3D::viewmat, and RegionView3D::viewmatob.
Referenced by armature_circle_select(), do_lasso_select_armature(), do_lasso_select_curve(), do_lasso_select_lattice(), do_lasso_select_mesh(), do_lasso_select_meta(), do_lasso_select_paintvert(), do_lasso_tag_pose(), do_lattice_box_select(), do_mesh_box_select(), do_nurbs_box_select(), do_paintvert_box_select(), drw_viewport_var_init(), ED_curve_editfont_select_pick(), ED_curve_pick_vert(), ED_mesh_pick_vert(), ED_view3d_init_mats_rv3d_gl(), edbm_dupli_extrude_cursor_invoke(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), edbm_knife_cut_exec(), edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), edbm_polybuild_transform_at_cursor_invoke(), EDBM_project_snap_verts(), EDBM_vert_find_nearest_ex(), findnearestLattvert(), knifetool_modal(), lattice_circle_select(), mball_circle_select(), mesh_circle_select(), mouse_mesh_loop(), nurbscurve_circle_select(), paint_vertsel_circle_select(), paint_weight_gradient_exec(), pose_circle_select(), sculpt_stroke_test_start(), vpaint_stroke_update_step(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), and wpaint_stroke_update_step().
| void ED_view3d_init_mats_rv3d_gl | ( | struct Object * | ob, |
| struct RegionView3D * | rv3d | ||
| ) |
Definition at line 200 of file space_view3d.c.
References ED_view3d_init_mats_rv3d(), GPU_matrix_mul, and Object::obmat.
| bool ED_view3d_is_object_under_cursor | ( | struct bContext * | C, |
| const int | mval[2] | ||
| ) |
Definition at line 2198 of file view3d_select.c.
References C, ED_view3d_give_object_under_cursor(), and NULL.
Referenced by view3d_ima_bg_drop_poll().
| void ED_view3d_lastview_store | ( | RegionView3D * | rv3d | ) |
Use to store the last view, before entering camera view.
Definition at line 487 of file view3d_utils.c.
References copy_qt_qt(), RegionView3D::lpersp, RegionView3D::lview, RegionView3D::lview_axis_roll, RegionView3D::lviewquat, RegionView3D::persp, RV3D_CAMOB, RegionView3D::view, RegionView3D::view_axis_roll, and RegionView3D::viewquat.
Referenced by region_quadview_init_rv3d(), sync_viewport_camera_smoothview(), view3d_camera_to_view_exec(), view3d_setobjectascamera_exec(), and view_camera_exec().
| void ED_view3d_local_collections_reset | ( | struct bContext * | C, |
| const bool | reset_all | ||
| ) |
Definition at line 1661 of file view3d_view.c.
References blender::compositor::area(), BKE_layer_collection_local_sync(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), View3D::flag, ID_RECALC_BASE_FLAGS, LISTBASE_FOREACH, View3D::local_collections_uuid, Main::screens, SPACE_VIEW3D, V3D_LOCAL_COLLECTIONS, and view3d_local_collections_reset().
Referenced by wm_open_mainfile__open().
See if current uuid is valid, otherwise set a valid uuid to v3d, Try to keep the same uuid previously used to allow users to quickly toggle back and forth.
Definition at line 1637 of file view3d_view.c.
References View3D::flag, free_localcollection_bit(), View3D::local_collections_uuid, reset(), V3D_LOCAL_COLLECTIONS, and view3d_local_collections_reset().
| bool ED_view3d_lock | ( | struct RegionView3D * | rv3d | ) |
Definition at line 1486 of file view3d_utils.c.
References ED_view3d_quat_from_axis_view(), RegionView3D::view, RegionView3D::view_axis_roll, and RegionView3D::viewquat.
Referenced by ED_view3d_quadview_update(), region_quadview_init_rv3d(), and view3d_viewmatrix_set().
| void ED_view3d_lock_clear | ( | struct View3D * | v3d | ) |
Definition at line 497 of file view3d_utils.c.
References View3D::flag2, NULL, View3D::ob_center, View3D::ob_center_bone, View3D::ob_center_cursor, and V3D_LOCK_CAMERA.
Referenced by view_lock_clear_exec(), and view_lock_to_active_exec().
| char ED_view3d_lock_view_from_index | ( | int | index | ) |
Definition at line 1452 of file view3d_utils.c.
References RV3D_VIEW_FRONT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, and RV3D_VIEW_USER.
Referenced by ED_view3d_quadview_update(), and region_quadview_exec().
| struct RV3DMatrixStore* ED_view3d_mats_rv3d_backup | ( | struct RegionView3D * | rv3d | ) |
Definition at line 2474 of file view3d_draw.c.
References copy_m4_m4(), copy_v4_v4(), MEM_mallocN, RV3DMatrixStore::persinv, RegionView3D::persinv, RV3DMatrixStore::persmat, RegionView3D::persmat, RV3DMatrixStore::pixsize, RegionView3D::pixsize, RV3DMatrixStore::viewcamtexcofac, RegionView3D::viewcamtexcofac, RV3DMatrixStore::viewinv, RegionView3D::viewinv, RV3DMatrixStore::viewmat, RegionView3D::viewmat, RV3DMatrixStore::winmat, and RegionView3D::winmat.
Referenced by ED_view3d_draw_offscreen().
| void ED_view3d_mats_rv3d_restore | ( | struct RegionView3D * | rv3d, |
| struct RV3DMatrixStore * | rv3dmat | ||
| ) |
Definition at line 2487 of file view3d_draw.c.
References copy_m4_m4(), copy_v4_v4(), RV3DMatrixStore::persinv, RegionView3D::persinv, RV3DMatrixStore::persmat, RegionView3D::persmat, RV3DMatrixStore::pixsize, RegionView3D::pixsize, RV3DMatrixStore::viewcamtexcofac, RegionView3D::viewcamtexcofac, RV3DMatrixStore::viewinv, RegionView3D::viewinv, RV3DMatrixStore::viewmat, RegionView3D::viewmat, RV3DMatrixStore::winmat, and RegionView3D::winmat.
Referenced by ED_view3d_draw_offscreen().
| void ED_view3d_ob_project_mat_get | ( | const struct RegionView3D * | v3d, |
| struct Object * | ob, | ||
| float | r_pmat[4][4] | ||
| ) |
Referenced by calcEdgeSlide_even(), calcEdgeSlide_mval_range(), createVertSlideVerts(), EDBM_mesh_knife(), edbm_rip_edge_invoke(), edbm_rip_invoke__edge(), edbm_rip_invoke__vert(), knife_recalc_projmat(), knifeproject_poly_from_object(), paint_convert_bb_to_rect(), sculpt_gesture_init_from_lasso(), sculpt_update_cache_invariants(), and vwpaint_update_cache_invariants().
| void ED_view3d_ob_project_mat_get_from_obmat | ( | const struct RegionView3D * | rv3d, |
| const float | obmat[4][4], | ||
| float | r_pmat[4][4] | ||
| ) |
Referenced by proj_paint_state_viewport_init().
| float ED_view3d_offset_distance | ( | const float | mat[4][4], |
| const float | ofs[3], | ||
| const float | fallback_dist | ||
| ) |
This function solves the problem of having to switch between camera and non-camera views.
When viewing from the perspective of mat, and having the view center ofs, this calculates a distance from ofs to the matrix mat. Using fallback_dist when the distance would be too small.
| mat | A matrix use for the view-point (typically the camera objects matrix). |
| ofs | Orbit center (negated), matching RegionView3D.ofs, which is typically passed in. |
| fallback_dist | The distance to use if the object is too near or in front of ofs. |
Definition at line 1286 of file view3d_utils.c.
References add_v3_v3(), dot_v3v3(), mul_m4_v4(), normalize_v3(), and pos.
Referenced by ED_view3d_camera_lock_init_ex(), ED_view3d_persp_switch_from_camera(), and ED_view3d_smooth_view_ex().
| bool ED_view3d_offset_lock_check | ( | const struct View3D * | v3d, |
| const struct RegionView3D * | rv3d | ||
| ) |
Referenced by initFlyInfo(), initWalkInfo(), view3d_lock_poll(), viewdolly_offset_lock_check(), and viewmove_apply().
| bool ED_view3d_persp_ensure | ( | const struct Depsgraph * | depsgraph, |
| struct View3D * | v3d, | ||
| struct ARegion * | region | ||
| ) |
Referenced by viewops_data_create(), and vieworbit_exec().
| void ED_view3d_persp_switch_from_camera | ( | const struct Depsgraph * | depsgraph, |
| struct View3D * | v3d, | ||
| struct RegionView3D * | rv3d, | ||
| const char | persp | ||
| ) |
Referenced by view3d_zoom_border_exec(), and viewdolly_invoke().
| float ED_view3d_pixel_size | ( | const struct RegionView3D * | rv3d, |
| const float | co[3] | ||
| ) |
| float ED_view3d_pixel_size_no_ui_scale | ( | const struct RegionView3D * | rv3d, |
| const float | co[3] | ||
| ) |
Referenced by drawDial3d(), DRW_draw_cursor(), gizmo_button2d_bounds(), gizmo_ruler_draw(), and wm_gizmo_calculate_scale().
| void ED_view3d_polygon_offset | ( | const struct RegionView3D * | rv3d, |
| const float | dist | ||
| ) |
| void ED_view3d_project | ( | const struct ARegion * | region, |
| const float | world[3], | ||
| float | r_region_co[3] | ||
| ) |
Convert between region relative coordinates (x,y) and depth component z and a point in world space.
Definition at line 812 of file view3d_project.c.
References GPU_matrix_project(), ARegion::regiondata, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winx, ARegion::winy, and world.
Referenced by cursor_draw_point_screen_space(), gizmo_preselect_elem_test_select(), key_test_depth(), object_transform_axis_target_calc_depth_init(), paint_line_strokes_spacing(), paint_space_stroke(), and voxel_size_edit_invoke().
| eV3DProjStatus ED_view3d_project_base | ( | const struct ARegion * | region, |
| struct Base * | base | ||
| ) |
Definition at line 100 of file view3d_project.c.
References ED_view3d_project_short_global(), IS_CLIPPED, Base::object, Object::obmat, ret, Base::sx, Base::sy, V3D_PROJ_RET_OK, and V3D_PROJ_TEST_CLIP_DEFAULT.
Referenced by do_lasso_select_objects(), and object_mouse_select_menu().
| eV3DProjStatus ED_view3d_project_float_ex | ( | const struct ARegion * | region, |
| float | perspmat[4][4], | ||
| const bool | is_local, | ||
| const float | co[3], | ||
| float | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
| eV3DProjStatus ED_view3d_project_float_global | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| float | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Referenced by annotation_stroke_convertcoords(), applyProject(), ApplySnapTranslation(), calculateCenterCursor(), ed_object_select_pick(), ED_view3d_cursor3d_update(), gizmo_button2d_bounds(), gizmo_ruler_draw(), gizmo_ruler_invoke(), blender::io::gpencil::GpencilIO::gpencil_3D_point_to_screen_space(), gpencil_brush_calc_midpoint(), gpencil_point_3d_to_xy(), gpencil_point_to_xy_fl(), gpencil_point_xy_to_3d(), gpencil_stroke_convertcoords(), gpencil_stroke_convertcoords_tpoint(), object_circle_select(), project_brush_radius(), projectFloatViewEx(), updateSelectedSnapPoint(), and view3d_ruler_pick().
| eV3DProjStatus ED_view3d_project_float_object | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| float | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Referenced by armature_foreachScreenBone(), ED_curve_editfont_select_pick(), ed_mesh_pick_face_vert__mpoly_find(), ed_mesh_pick_vert__mapFunc(), edbm_dupli_extrude_cursor_invoke(), edbm_knife_cut_exec(), EDBM_project_snap_verts(), gradientVertInit__mapFunc(), lattice_foreachScreenVert(), mball_foreachScreenElem(), mesh_foreachScreenEdge__mapFunc(), mesh_foreachScreenEdge_clip_bb_segment__mapFunc(), mesh_foreachScreenFace__mapFunc(), mesh_foreachScreenVert__mapFunc(), meshobject_foreachScreenVert__mapFunc(), mouse_mesh_loop(), nurbs_foreachScreenVert(), pose_foreachScreenBone(), tex_color_alpha(), and vpaint_proj_dm_map_cosnos_update__map_cb().
| void ED_view3d_project_float_v2_m4 | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| float | r_co[2], | ||
| float | mat[4][4] | ||
| ) |
Referenced by calcEdgeSlide_even(), calcVertSlideCustomPoints(), calcVertSlideMouseActiveVert(), edbm_rip_edge_invoke(), edbm_rip_edge_side_measure(), edbm_rip_edgedist_squared(), knife_project_v2(), knifeproject_poly_from_object(), paint_convert_bb_to_rect(), SCULPT_brush_strength_factor(), and sculpt_gesture_is_effected_lasso().
| void ED_view3d_project_float_v3_m4 | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| float | r_co[3], | ||
| float | mat[4][4] | ||
| ) |
Referenced by calcEdgeSlide_mval_range().
| eV3DProjStatus ED_view3d_project_int_ex | ( | const struct ARegion * | region, |
| float | perspmat[4][4], | ||
| const bool | is_local, | ||
| const float | co[3], | ||
| int | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
| eV3DProjStatus ED_view3d_project_int_global | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| int | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
| eV3DProjStatus ED_view3d_project_int_object | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| int | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
| eV3DProjStatus ED_view3d_project_short_ex | ( | const struct ARegion * | region, |
| float | perspmat[4][4], | ||
| const bool | is_local, | ||
| const float | co[3], | ||
| short | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Referenced by DRW_text_cache_draw().
| eV3DProjStatus ED_view3d_project_short_global | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| short | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
| eV3DProjStatus ED_view3d_project_short_object | ( | const struct ARegion * | region, |
| const float | co[3], | ||
| short | r_co[2], | ||
| const eV3DProjTest | flag | ||
| ) |
Definition at line 939 of file view3d_utils.c.
References ARegion::alignment, blender::compositor::area(), ED_area_tag_redraw(), ED_view3d_lock(), ED_view3d_lock_view_from_index(), ARegion::next, NULL, RegionView3D::persp, ARegion::prev, ARegion::regiondata, RegionView3D::rflag, RGN_ALIGN_QSPLIT, RV3D_BOXCLIP, RV3D_BOXVIEW, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_ORTHO, RV3D_VIEW_AXIS_ROLL_0, RV3D_VIEW_IS_AXIS, RegionView3D::view, view3d_boxview_sync(), RegionView3D::view_axis_roll, and RegionView3D::viewlock.
Referenced by region_quadview_init_rv3d().
| bool ED_view3d_quat_from_axis_view | ( | const char | view, |
| const char | view_axis_roll, | ||
| float | r_quat[4] | ||
| ) |
Definition at line 1418 of file view3d_utils.c.
References BLI_assert, copy_qt_qt(), RV3D_VIEW_AXIS_ROLL_270, RV3D_VIEW_FRONT, RV3D_VIEW_IS_AXIS, view, and view3d_quat_axis.
Referenced by ED_view3d_lock(), view3d_boxview_sync_axis(), view_axis_exec(), vieworbit_exec(), and viewrotate_apply_snap().
| bool ED_view3d_quat_to_axis_view | ( | const float | viewquat[4], |
| const float | epsilon, | ||
| char * | r_view, | ||
| char * | r_view_axis_rotation | ||
| ) |
Definition at line 1428 of file view3d_utils.c.
References angle_signed_qtqt(), blender::robust_pred::epsilon, fabsf, RV3D_VIEW_AXIS_ROLL_0, RV3D_VIEW_AXIS_ROLL_270, RV3D_VIEW_BOTTOM, RV3D_VIEW_FRONT, RV3D_VIEW_USER, view, and view3d_quat_axis.
Referenced by viewrotate_apply_snap().
| float ED_view3d_radius_to_dist | ( | const struct View3D * | v3d, |
| const struct ARegion * | region, | ||
| const struct Depsgraph * | depsgraph, | ||
| const char | persp, | ||
| const bool | use_aspect, | ||
| const float | radius | ||
| ) |
Referenced by view3d_from_minmax(), and view3d_localview_init().
Definition at line 1164 of file view3d_utils.c.
References DEFAULT_SENSOR_WIDTH.
Referenced by ED_view3d_radius_to_dist().
Definition at line 1159 of file view3d_utils.c.
Referenced by ED_view3d_radius_to_dist().
| void ED_view3d_screen_datamask | ( | const struct bContext * | C, |
| const struct Scene * | scene, | ||
| const struct bScreen * | screen, | ||
| struct CustomData_MeshMasks * | r_cddata_masks | ||
| ) |
Referenced by wm_event_do_depsgraph().
| float ED_view3d_select_dist_px | ( | void | ) |
Definition at line 117 of file view3d_select.c.
Referenced by ED_curve_editfont_select_pick(), ED_curve_pick_vert(), ed_object_select_pick(), edbm_elem_find_nearest(), findnearestLattvert(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), loopcut_mouse_move(), pe_deflect_emitter(), PE_mouse_particles(), and unified_findnearest().
| eV3DSelectObjectFilter ED_view3d_select_filter_from_mode | ( | const struct Scene * | scene, |
| const struct Object * | obact | ||
| ) |
Referenced by do_object_box_select(), do_pose_box_select(), and ed_object_select_pick().
| void ED_view3d_select_id_validate | ( | struct ViewContext * | vc | ) |
Definition at line 2192 of file view3d_draw.c.
References ViewContext::depsgraph, ViewContext::obact, ViewContext::region, ViewContext::v3d, validate_object_select_id(), and ViewContext::view_layer.
Referenced by ED_mesh_pick_face(), ED_mesh_pick_vert(), and imapaint_pick_face().
Definition at line 248 of file space_view3d.c.
References blender::compositor::area(), ED_view3d_stop_render_preview(), ListBase::first, ARegion::next, OB_RENDER, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, View3D::shading, View3DShading::type, and Main::wm.
Referenced by toggle_matcap_flip(), and toggle_shading_exec().
| void ED_view3d_stop_render_preview | ( | struct wmWindowManager * | wm, |
| struct ARegion * | region | ||
| ) |
Definition at line 225 of file space_view3d.c.
References BPy_BEGIN_ALLOW_THREADS, BPy_END_ALLOW_THREADS, NULL, RE_engine_free(), ARegion::regiondata, RegionView3D::render_engine, WM_draw_region_free(), WM_JOB_TYPE_RENDER_PREVIEW, and WM_jobs_kill_type().
Referenced by ED_render_engine_area_exit(), ED_view3d_shade_update(), and view3d_main_region_exit().
Calculate the view transformation matrix from RegionView3D input. The resulting matrix is equivalent to RegionView3D.viewinv
| mat | The view 4x4 transformation matrix to calculate. |
| ofs | The view offset, normally from RegionView3D.ofs. |
| quat | The view rotation, quaternion normally from RegionView3D.viewquat. |
| dist | The view distance from ofs, normally from RegionView3D.dist. |
Definition at line 1539 of file view3d_utils.c.
References mul_mat3_m4_v3(), quat_to_mat4(), and sub_v3_v3v3().
Referenced by ED_view3d_camera_lock_sync(), ED_view3d_cameracontrol_acquire(), ED_view3d_cameracontrol_update(), and ED_view3d_to_object().
| void ED_view3d_to_object | ( | const struct Depsgraph * | depsgraph, |
| struct Object * | ob, | ||
| const float | ofs[3], | ||
| const float | quat[4], | ||
| const float | dist | ||
| ) |
Referenced by view3d_camera_to_view_exec().
| bool ED_view3d_unproject | ( | const struct ARegion * | region, |
| float | regionx, | ||
| float | regiony, | ||
| float | regionz, | ||
| float | world[3] | ||
| ) |
Definition at line 821 of file view3d_project.c.
References GPU_matrix_unproject(), ARegion::regiondata, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winx, ARegion::winy, and world.
Referenced by ED_view3d_autodist(), ED_view3d_autodist_simple(), ED_view3d_clipping_calc(), ED_view3d_depth_unproject(), knife_input_ray_segment(), point_is_visible(), and view3d_zoom_border_exec().
| void ED_view3d_update_viewmat | ( | struct Depsgraph * | depsgraph, |
| const struct Scene * | scene, | ||
| struct View3D * | v3d, | ||
| struct ARegion * | region, | ||
| const float | viewmat[4][4], | ||
| const float | winmat[4][4], | ||
| const struct rcti * | rect, | ||
| bool | offscreen | ||
| ) |
Referenced by ED_view3d_smooth_view_force_finish(), and gpencil_render_offscreen().
| void ED_view3d_viewcontext_init | ( | struct bContext * | C, |
| struct ViewContext * | vc, | ||
| struct Depsgraph * | depsgraph | ||
| ) |
Definition at line 123 of file view3d_select.c.
References ViewContext::bmain, ViewContext::C, C, CTX_data_active_object(), CTX_data_edit_object(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_region(), CTX_wm_region_view3d(), CTX_wm_view3d(), CTX_wm_window(), depsgraph, ViewContext::depsgraph, ViewContext::obact, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, ViewContext::scene, ViewContext::v3d, ViewContext::view_layer, and ViewContext::win.
Referenced by add_vertex_invoke(), clip_planes_from_rect(), curve_draw_init(), ED_armature_edit_deselect_all_visible_multi(), ED_armature_edit_select_pick(), ed_armature_pick_bone_impl(), ED_curve_deselect_all_multi(), ED_curve_editfont_select_pick(), ED_curve_editnurb_select_pick(), ED_lattice_deselect_all_multi(), ED_lattice_select_pick(), ED_mball_deselect_all_multi(), ED_mball_select_pick(), ED_mesh_pick_face(), ED_mesh_pick_vert(), ed_object_select_pick(), ED_pose_deselect_all_multi(), ED_view3d_give_base_under_cursor(), EDBM_mesh_deselect_all_multi(), EDBM_selectmode_disable_multi(), edcu_shortest_path_pick_invoke(), em_setup_viewcontext(), object_transform_axis_target_invoke(), paint_cursor_context_init(), paint_sample_color(), paint_stroke_new(), PE_set_view3d_data(), sample_detail(), SCULPT_cursor_geometry_info_update(), SCULPT_filter_cache_init(), sculpt_gesture_context_init_common(), SCULPT_stroke_get_location(), select_linked_pick_invoke(), texture_paint_init(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), view3d_select_exec(), vpaint_stroke_test_start(), weight_paint_sample_enum_itemf(), weight_sample_group_exec(), weight_sample_invoke(), and wpaint_stroke_test_start().
| void ED_view3d_viewcontext_init_object | ( | struct ViewContext * | vc, |
| struct Object * | obact | ||
| ) |
Definition at line 139 of file view3d_select.c.
References BKE_editmesh_from_object(), BKE_object_is_in_editmode(), BLI_assert, ViewContext::em, ViewContext::obact, and ViewContext::obedit.
Referenced by ED_curve_pick_vert(), ED_lattice_select_pick(), ED_mball_select_pick(), edbm_dupli_extrude_cursor_invoke(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), edbm_preselect_or_active_init_viewcontext(), edbm_select_linked_pick_invoke(), EDBM_select_pick(), edbm_shortest_path_pick_invoke(), EDBM_unified_findnearest_from_raycast(), EDBM_vert_find_nearest_ex(), edcu_shortest_path_pick_invoke(), findnearestLattvert(), loopcut_init(), loopcut_mouse_move(), mouse_mesh_loop(), view3d_box_select_exec(), view3d_circle_select_exec(), and view3d_lasso_select().
| bool ED_view3d_viewplane_get | ( | struct Depsgraph * | depsgraph, |
| const struct View3D * | v3d, | ||
| const struct RegionView3D * | rv3d, | ||
| int | winxi, | ||
| int | winyi, | ||
| struct rctf * | r_viewplane, | ||
| float * | r_clipsta, | ||
| float * | r_clipend, | ||
| float * | r_pixsize | ||
| ) |
Referenced by ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), and view3d_winmatrix_set().
| void ED_view3d_win_to_3d | ( | const struct View3D * | v3d, |
| const struct ARegion * | region, | ||
| const float | depth_pt[3], | ||
| const float | mval[2], | ||
| float | r_out[3] | ||
| ) |
Referenced by armature_click_extrude_invoke(), curve_draw_invoke(), depthdropper_depth_sample_pt(), ED_gizmotypes_snap_3d_update(), gizmo_window_project_3d(), gpencil_strokepoint_convertcoords(), initBend(), knifetool_draw_angle_snapping(), mesh_bisect_interactive_calc(), sculpt_gesture_line_calculate_plane_points(), sculpt_gesture_trim_geometry_generate(), sculpt_update_brush_delta(), stroke_elem_project_fallback(), view3d_interactive_add_calc_plane(), and viewops_data_create().
| void ED_view3d_win_to_3d_int | ( | const struct View3D * | v3d, |
| const struct ARegion * | region, | ||
| const float | depth_pt[3], | ||
| const int | mval[2], | ||
| float | r_out[3] | ||
| ) |
Referenced by add_vertex_invoke(), ED_view3d_autodist(), ED_view3d_cursor3d_position(), edbm_dupli_extrude_cursor_invoke(), edbm_point_normals_modal(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), gizmo_mesh_spin_redo_setup(), view3d_preselect_update_preview_triangle_from_edge(), view3d_preselect_update_preview_triangle_from_vert(), view3d_ruler_item_project(), and viewcenter_pick_invoke().
| bool ED_view3d_win_to_3d_on_plane_int | ( | const struct ARegion * | region, |
| const float | plane[4], | ||
| const int | mval[2], | ||
| const bool | do_clip, | ||
| float | r_out[3] | ||
| ) |
Referenced by gizmo_mesh_spin_redo_setup().
| bool ED_view3d_win_to_3d_on_plane_with_fallback | ( | const struct ARegion * | region, |
| const float | plane[4], | ||
| const float | mval[2], | ||
| const bool | do_clip, | ||
| const float | plane_fallback[4], | ||
| float | r_out[3] | ||
| ) |
Referenced by view3d_win_to_3d_on_plane_maybe_fallback().
| void ED_view3d_win_to_delta | ( | const struct ARegion * | region, |
| const float | mval[2], | ||
| float | out[3], | ||
| const float | zfac | ||
| ) |
Referenced by annotation_stroke_convertcoords(), brush_edit_apply(), calc_local_y(), calcVertSlideMouseActiveEdges(), convertViewVec(), drawVertSlide(), gpencil_brush_calc_midpoint(), gpencil_brush_grab_calc_dvec(), gpencil_brush_randomize_apply(), gpencil_point_xy_to_3d(), gpencil_stroke_convertcoords(), gpencil_stroke_convertcoords_tpoint(), mesh_bisect_interactive_calc(), move3d_get_translate(), paint_calc_object_space_radius(), view3d_zoom_border_exec(), view_zoom_to_window_xy_3d(), and viewmove_apply().
| void ED_view3d_win_to_ray | ( | const struct ARegion * | region, |
| const float | mval[2], | ||
| float | r_ray_start[3], | ||
| float | r_ray_normal[3] | ||
| ) |
Referenced by gizmo_arrow_modal(), and object_transform_axis_target_calc_depth_init().
| bool ED_view3d_win_to_ray_clipped | ( | struct Depsgraph * | depsgraph, |
| const struct ARegion * | region, | ||
| const struct View3D * | v3d, | ||
| const float | mval[2], | ||
| float | ray_start[3], | ||
| float | ray_normal[3], | ||
| const bool | do_clip | ||
| ) |
Referenced by ED_gpencil_stroke_reproject(), and EDBM_unified_findnearest_from_raycast().
| bool ED_view3d_win_to_segment_clipped | ( | struct Depsgraph * | depsgraph, |
| const struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const float | mval[2], | ||
| float | r_ray_start[3], | ||
| float | r_ray_end[3], | ||
| const bool | do_clip | ||
| ) |
Referenced by BMBVH_EdgeVisible(), brush_add_count_iter(), knife_find_line_hits(), and SCULPT_raycast_init().
Referenced by gizmo_find_intersected_3d_intern(), mesh_bisect_interactive_calc(), and viewops_data_create().
| bool edge_inside_circle | ( | const float | cent[2], |
| float | radius, | ||
| const float | screen_co_a[2], | ||
| const float | screen_co_b[2] | ||
| ) |
Definition at line 2838 of file view3d_select.c.
References dist_squared_to_line_segment_v2().
Referenced by do_circle_select_armature__doSelectBone(), do_circle_select_pose__doSelectBone(), gpencil_stroke_inside_circle(), and mesh_circle_doSelectEdge().
Definition at line 90 of file drawobject.c.
References circball_array_fill(), CIRCLE_RESOL, GPU_PRIM_LINE_LOOP, immBegin(), immEnd(), immVertex3fv(), pos, and verts.
Referenced by drawPropCircle(), drawSnapping(), and ED_gizmotypes_snap_3d_draw_util().
| void lattice_foreachScreenVert | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct BPoint *bp, const float screen_co[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_lattice(), do_lattice_box_select(), findnearestLattvert(), and lattice_circle_select().
| void mball_foreachScreenElem | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct MetaElem *ml, const float screen_co[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_meta(), and mball_circle_select().
| void mesh_foreachScreenEdge | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by EDBM_edge_find_nearest_ex().
| void mesh_foreachScreenEdge_clip_bb_segment | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), and mesh_circle_select().
| void mesh_foreachScreenFace | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct BMFace *efa, const float screen_co[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), EDBM_face_find_nearest_ex(), and mesh_circle_select().
| void mesh_foreachScreenVert | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct BMVert *eve, const float screen_co[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), EDBM_vert_find_nearest_ex(), and mesh_circle_select().
| void meshobject_foreachScreenVert | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct MVert *eve, const float screen_co[2], int index) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), and paint_vertsel_circle_select().
| void nurbs_foreachScreenVert | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, bool handle_visible, const float screen_co[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Referenced by do_lasso_select_curve(), do_nurbs_box_select(), ED_curve_pick_vert(), and nurbscurve_circle_select().
| void pose_foreachScreenBone | ( | struct ViewContext * | vc, |
| void(*)(void *userData, struct bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]) | func, | ||
| void * | userData, | ||
| const eV3DProjTest | clip_flag | ||
| ) |
Definition at line 598 of file view3d_iterators.c.
References BKE_pose_channel_find_name(), bPoseChannel::bone, bPose::chanbase, Object::data, DEG_get_evaluated_object(), ViewContext::depsgraph, ED_view3d_check_mats_rv3d, ED_view3d_project_float_object(), ListBase::first, IS_CLIPPED, bPoseChannel::name, bPoseChannel::next, ViewContext::obact, PBONE_VISIBLE, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, ViewContext::region, ViewContext::rv3d, and V3D_PROJ_RET_OK.
Referenced by do_lasso_tag_pose(), and pose_circle_select().
| int view3d_opengl_select | ( | struct ViewContext * | vc, |
| unsigned int * | buffer, | ||
| unsigned int | bufsize, | ||
| const struct rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter | ||
| ) |
| void view3d_opengl_select_cache_begin | ( | void | ) |
Optionally cache data for multiple calls to view3d_opengl_select
just avoid GPU_select headers outside this file
Definition at line 892 of file view3d_view.c.
References GPU_select_cache_begin().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| void view3d_opengl_select_cache_end | ( | void | ) |
Definition at line 897 of file view3d_view.c.
References GPU_select_cache_end().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| int view3d_opengl_select_with_id_filter | ( | struct ViewContext * | vc, |
| unsigned int * | buffer, | ||
| unsigned int | bufsize, | ||
| const struct rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter, | ||
| uint | select_id | ||
| ) |
Referenced by ed_armature_pick_bone_impl(), and get_nearest_editbonepoint().
| void view3d_operator_needs_opengl | ( | const struct bContext * | C | ) |
Referenced by armature_select_linked_pick_invoke(), armature_shortest_path_pick_invoke(), brush_edit_apply(), clip_planes_from_rect(), curve_draw_invoke(), depthdropper_depth_sample_pt(), ED_curve_editnurb_select_pick(), ED_view3d_cursor3d_position(), ED_view3d_give_base_under_cursor(), edbm_point_normals_modal(), edbm_select_linked_pick_invoke(), edbm_select_loop_invoke(), edbm_shortest_path_pick_invoke(), edcu_shortest_path_pick_invoke(), gizmo_find_intersected_3d(), gpencil_point_conversion_init(), loopcut_init(), loopcut_modal(), object_transform_axis_target_modal(), paint_proj_new_stroke(), paint_proj_stroke(), paint_sample_color(), paint_select_linked_pick_invoke(), pose_select_connected_invoke(), sculpt_brush_stroke_init(), select_linked_pick_invoke(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), view3d_select_exec(), view3d_zoom_border_exec(), viewcenter_pick_invoke(), viewops_data_create(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), and wpaint_stroke_update_step().