|
Blender V5.0
|
#include "BLI_bounds_types.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_vector_types.hh"#include "BLI_utildefines.h"#include "DNA_scene_types.h"Go to the source code of this file.
Classes | |
| struct | ViewContext |
| struct | ViewDepths |
| struct | V3DSnapCursorData |
| struct | V3DSnapCursorState |
| class | ViewportColorSampleSession |
Namespaces | |
| namespace | blender |
| namespace | blender::ed |
| namespace | blender::ed::transform |
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 |
| #define | V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT |
| #define | USE_SNAP_DETECT_FROM_KEYMAP_HACK |
| #define | VIEW3D_MARGIN 1.4f |
| #define | VIEW3D_DIST_FALLBACK 1.0f |
| #define | SHADING_XRAY_ALPHA(shading) |
| #define | SHADING_XRAY_FLAG(shading) |
| #define | SHADING_XRAY_FLAG_ENABLED(shading) |
| #define | SHADING_XRAY_ENABLED(shading) |
| #define | SHADING_XRAY_ACTIVE(shading) |
| #define | XRAY_ALPHA(v3d) |
| #define | XRAY_FLAG(v3d) |
| #define | XRAY_FLAG_ENABLED(v3d) |
| #define | XRAY_ENABLED(v3d) |
| #define | XRAY_ACTIVE(v3d) |
| #define | OVERLAY_RETOPOLOGY_ENABLED(overlay) |
| #define | OVERLAY_RETOPOLOGY_MIN_OFFSET FLT_EPSILON |
| #define | OVERLAY_RETOPOLOGY_OFFSET(overlay) |
| #define | RETOPOLOGY_ENABLED(v3d) |
| #define | RETOPOLOGY_OFFSET(v3d) |
Functions | |
| void | ED_view3d_background_color_get (const Scene *scene, const View3D *v3d, float r_color[3]) |
| void | ED_view3d_text_colors_get (const Scene *scene, const View3D *v3d, float r_text_color[4], float r_shadow_color[4]) |
| bool | ED_view3d_has_workbench_in_texture_color (const Scene *scene, const Object *ob, const View3D *v3d) |
| void | ED_view3d_cursor3d_position (bContext *C, const int mval[2], bool use_depth, float r_cursor_co[3]) |
| void | ED_view3d_cursor3d_position_rotation (bContext *C, const int mval[2], 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], bool use_depth, enum eV3DCursorOrient orientation) |
| Camera * | ED_view3d_camera_data_get (View3D *v3d, RegionView3D *rv3d) |
| void | ED_view3d_to_m4 (float mat[4][4], const float ofs[3], const float quat[4], 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 Object *ob, float ofs[3], float quat[4], const float *dist, float *lens) |
| void | ED_view3d_to_object (const Depsgraph *depsgraph, Object *ob, const float ofs[3], const float quat[4], float dist) |
| bool | ED_view3d_camera_to_view_selected (Main *bmain, Depsgraph *depsgraph, const Scene *scene, Object *camera_ob) |
| bool | ED_view3d_camera_to_view_selected_with_set_clipping (Main *bmain, Depsgraph *depsgraph, const Scene *scene, Object *camera_ob) |
| void | ED_view3d_lastview_store (RegionView3D *rv3d) |
| void | ED_view3d_depth_override (Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obact, eV3DDepthOverrideMode mode, bool use_overlay, ViewDepths **r_depths) |
| void | ED_view3d_depths_free (ViewDepths *depths) |
| 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 ARegion *region, const ViewDepths *depths, const int mval[2], float r_normal[3]) |
| bool | ED_view3d_depth_unproject_v3 (const ARegion *region, const int mval[2], double depth, float r_location_world[3]) |
| bool | ED_view3d_has_depth_buffer_updated (const Depsgraph *depsgraph, const View3D *v3d) |
| ViewOpsData * | ED_view3d_navigation_init (bContext *C, const wmKeyMapItem *kmi_merge) |
| bool | ED_view3d_navigation_do (bContext *C, ViewOpsData *vod, const wmEvent *event, const float depth_loc_override[3]) |
| void | ED_view3d_navigation_free (bContext *C, ViewOpsData *vod) |
| ENUM_OPERATORS (eV3DProjStatus, V3D_PROJ_RET_OVERFLOW) | |
| ENUM_OPERATORS (eV3DProjTest, V3D_PROJ_TEST_CLIP_CONTENT) | |
| bool | ED_view3d_snap_selected_to_location (bContext *C, wmOperator *op, const float target_loc_global[3], int pivot_point) |
| void | ED_view3d_cursor_snap_state_default_set (V3DSnapCursorState *state) |
| V3DSnapCursorState * | ED_view3d_cursor_snap_state_active_get () |
| void | ED_view3d_cursor_snap_state_active_set (V3DSnapCursorState *state) |
| V3DSnapCursorState * | ED_view3d_cursor_snap_state_create () |
| void | ED_view3d_cursor_snap_state_free (V3DSnapCursorState *state) |
| void | ED_view3d_cursor_snap_state_prevpoint_set (V3DSnapCursorState *state, const float prev_point[3]) |
| void | ED_view3d_cursor_snap_data_update (V3DSnapCursorState *state, const bContext *C, const ARegion *region, const blender::int2 &mval) |
| V3DSnapCursorData * | ED_view3d_cursor_snap_data_get () |
| blender::ed::transform::SnapObjectContext * | ED_view3d_cursor_snap_context_ensure (Scene *scene) |
| void | ED_view3d_cursor_snap_draw_util (RegionView3D *rv3d, const float source_loc[3], const float target_loc[3], const eSnapMode source_type, const eSnapMode target_type, const uchar source_color[4], const uchar target_color[4]) |
| void | meshobject_foreachScreenVert (const ViewContext *vc, void(*func)(void *user_data, const float screen_co[2], int index), void *user_data, eV3DProjTest clip_flag) |
| void | mesh_foreachScreenVert (const ViewContext *vc, void(*func)(void *user_data, BMVert *eve, const float screen_co[2], int index), void *user_data, eV3DProjTest clip_flag) |
| void | mesh_foreachScreenEdge (const ViewContext *vc, void(*func)(void *user_data, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *user_data, eV3DProjTest clip_flag) |
| void | mesh_foreachScreenEdge_clip_bb_segment (const ViewContext *vc, void(*func)(void *user_data, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), void *user_data, eV3DProjTest clip_flag) |
| void | mesh_foreachScreenFace (const ViewContext *vc, void(*func)(void *user_data, BMFace *efa, const float screen_co[2], int index), void *user_data, eV3DProjTest clip_flag) |
| void | nurbs_foreachScreenVert (const ViewContext *vc, void(*func)(void *user_data, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, bool handle_visible, const float screen_co[2]), void *user_data, eV3DProjTest clip_flag) |
| void | mball_foreachScreenElem (const ViewContext *vc, void(*func)(void *user_data, MetaElem *ml, const float screen_co[2]), void *user_data, eV3DProjTest clip_flag) |
| void | lattice_foreachScreenVert (const ViewContext *vc, void(*func)(void *user_data, BPoint *bp, const float screen_co[2]), void *user_data, eV3DProjTest clip_flag) |
| void | armature_foreachScreenBone (const ViewContext *vc, void(*func)(void *user_data, EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]), void *user_data, eV3DProjTest clip_flag) |
| void | pose_foreachScreenBone (const ViewContext *vc, void(*func)(void *user_data, bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]), void *user_data, eV3DProjTest clip_flag) |
| blender::float2 | ED_view3d_project_float_v2_m4 (const ARegion *region, const float co[3], const blender::float4x4 &mat) |
| void | ED_view3d_project_float_v3_m4 (const ARegion *region, const float co[3], float r_co[3], const float mat[4][4]) |
| eV3DProjStatus | ED_view3d_project_base (const ARegion *region, Base *base, float r_co[2]) |
| eV3DProjStatus | ED_view3d_project_short_ex (const ARegion *region, float perspmat[4][4], bool is_local, const float co[3], short r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_short_global (const ARegion *region, const float co[3], short r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_short_object (const ARegion *region, const float co[3], short r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_ex (const ARegion *region, float perspmat[4][4], bool is_local, const float co[3], int r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_global (const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_int_object (const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_ex (const ARegion *region, float perspmat[4][4], bool is_local, const float co[3], float r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_global (const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag) |
| eV3DProjStatus | ED_view3d_project_float_object (const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag) |
| float | ED_view3d_pixel_size (const RegionView3D *rv3d, const float co[3]) |
| float | ED_view3d_pixel_size_no_ui_scale (const RegionView3D *rv3d, const float co[3]) |
| float | ED_view3d_calc_zfac_ex (const RegionView3D *rv3d, const float co[3], bool *r_flip) |
| float | ED_view3d_calc_zfac (const RegionView3D *rv3d, const float co[3]) |
| float | ED_view3d_calc_depth_for_comparison (const RegionView3D *rv3d, const float co[3]) |
| bool | ED_view3d_clip_segment (const RegionView3D *rv3d, float ray_start[3], float ray_end[3]) |
| bool | ED_view3d_win_to_ray_clipped (Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_normal[3], bool do_clip_planes) |
| bool | ED_view3d_win_to_ray_clipped_ex (Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const float mval[2], const bool do_clip_planes, float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], float r_ray_end[3]) |
| void | ED_view3d_win_to_ray (const ARegion *region, const float mval[2], float r_ray_start[3], float r_ray_normal[3]) |
| void | ED_view3d_global_to_vector (const RegionView3D *rv3d, const float coord[3], float r_out[3]) |
| void | ED_view3d_win_to_3d (const View3D *v3d, const ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3]) |
| void | ED_view3d_win_to_3d_int (const View3D *v3d, const ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3]) |
| void | ED_view3d_win_to_3d_with_shift (const View3D *v3d, const ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane (const ARegion *region, const float plane[4], const float mval[2], bool do_clip, float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane_with_fallback (const ARegion *region, const float plane[4], const float mval[2], bool do_clip, const float plane_fallback[4], float r_out[3]) |
| bool | ED_view3d_win_to_3d_on_plane_int (const ARegion *region, const float plane[4], const int mval[2], bool do_clip, float r_out[3]) |
| void | ED_view3d_win_to_delta (const ARegion *region, const float xy_delta[2], float zfac, float r_out[3], bool precise=false) |
| void | ED_view3d_win_to_origin (const ARegion *region, const float mval[2], float r_out[3]) |
| void | ED_view3d_win_to_vector (const ARegion *region, const float mval[2], float r_out[3]) |
| bool | ED_view3d_win_to_segment_clipped (const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const float mval[2], float r_ray_start[3], float r_ray_end[3], bool do_clip_planes) |
| blender::float4x4 | ED_view3d_ob_project_mat_get (const RegionView3D *rv3d, const Object *ob) |
| blender::float4x4 | ED_view3d_ob_project_mat_get_from_obmat (const RegionView3D *rv3d, const blender::float4x4 &obmat) |
| void | ED_view3d_project_v3 (const ARegion *region, const float world[3], float r_region_co[3]) |
| void | ED_view3d_project_v2 (const ARegion *region, const float world[3], float r_region_co[2]) |
| bool | ED_view3d_unproject_v3 (const ARegion *region, float regionx, float regiony, float regionz, float world[3]) |
| blender::Bounds< float > | ED_view3d_dist_soft_range_get (const View3D *v3d, bool use_persp_range) |
| float | ED_view3d_dist_soft_min_get (const View3D *v3d, bool use_persp_range) |
| bool | ED_view3d_clip_range_get (const Depsgraph *depsgraph, const View3D *v3d, const RegionView3D *rv3d, bool use_ortho_factor, float *r_clip_start, float *r_clip_end) |
| bool | ED_view3d_viewplane_get (const Depsgraph *depsgraph, const View3D *v3d, const RegionView3D *rv3d, int winx, int winy, rctf *r_viewplane, float *r_clip_start, float *r_clip_end, float *r_pixsize) |
| void | ED_view3d_polygon_offset (const RegionView3D *rv3d, float dist) |
| void | ED_view3d_calc_camera_border (const Scene *scene, const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, bool no_shift, rctf *r_viewborder) |
| void | ED_view3d_calc_camera_border_size (const Scene *scene, Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, float r_size[2]) |
| bool | ED_view3d_calc_render_border (const Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, rcti *r_rect) |
| void | ED_view3d_clipping_calc_from_boundbox (float clip[4][4], const BoundBox *bb, bool is_flip) |
| void | ED_view3d_clipping_calc (BoundBox *bb, float planes[4][4], const ARegion *region, const Object *ob, const rcti *rect) |
| bool | ED_view3d_clipping_clamp_minmax (const RegionView3D *rv3d, float min[3], float max[3]) |
| void | ED_view3d_clipping_local (RegionView3D *rv3d, const float mat[4][4]) |
| bool | ED_view3d_clipping_test (const RegionView3D *rv3d, const float co[3], bool is_local) |
| float | ED_view3d_radius_to_dist_persp (float angle, float radius) |
| float | ED_view3d_radius_to_dist_ortho (float lens, float radius) |
| float | ED_view3d_radius_to_dist (const View3D *v3d, const ARegion *region, const Depsgraph *depsgraph, char persp, bool use_aspect, float radius) |
| int | ED_view3d_backbuf_sample_size_clamp (ARegion *region, float dist) |
| void | ED_view3d_select_id_validate (const ViewContext *vc) |
| bool | ED_view3d_autodist_last_check (wmWindow *win, const wmEvent *event) |
| bool | ED_view3d_autodist_last_get (wmWindow *win, float r_ofs[3]) |
| void | ED_view3d_autodist_last_set (wmWindow *win, const wmEvent *event, const float ofs[3], const bool has_depth) |
| void | ED_view3d_autodist_last_clear (wmWindow *win) |
| bool | ED_view3d_autodist (ARegion *region, View3D *v3d, const int mval[2], float mouse_worldloc[3], const float fallback_depth_pt[3]) |
| bool | ED_view3d_autodist_simple (ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth) |
| bool | ED_view3d_depth_read_cached_seg (const ViewDepths *vd, const int mval_sta[2], const int mval_end[2], int margin, float *r_depth) |
| eV3DSelectObjectFilter | ED_view3d_select_filter_from_mode (const Scene *scene, const Object *obact) |
| void | view3d_gpu_select_cache_begin () |
| void | view3d_gpu_select_cache_end () |
| int | view3d_gpu_select_ex (const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, bool do_material_slot_selection) |
| int | view3d_gpu_select (const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter) |
| int | view3d_gpu_select_with_id_filter (const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, uint select_id) |
| float | ED_view3d_select_dist_px () |
| ViewContext | ED_view3d_viewcontext_init (bContext *C, Depsgraph *depsgraph) |
| void | ED_view3d_viewcontext_init_object (ViewContext *vc, Object *obact) |
| void | view3d_operator_needs_gpu (const bContext *C) |
| void | view3d_region_operator_needs_gpu (ARegion *region) |
| bool | edge_inside_circle (const float cent[2], float radius, const float screen_co_a[2], const float screen_co_b[2]) |
| RegionView3D * | ED_view3d_context_rv3d (bContext *C) |
| bool | ED_view3d_context_user_region (bContext *C, View3D **r_v3d, ARegion **r_region) |
| bool | ED_view3d_area_user_region (const ScrArea *area, const View3D *v3d, ARegion **r_region) |
| bool | ED_operator_rv3d_user_region_poll (bContext *C) |
| void | ED_view3d_init_mats_rv3d (const Object *ob, RegionView3D *rv3d) |
| void | ED_view3d_init_mats_rv3d_gl (const Object *ob, RegionView3D *rv3d) |
| void | ED_view3d_clear_mats_rv3d (RegionView3D *rv3d) |
| void | ED_view3d_check_mats_rv3d (RegionView3D *rv3d) |
| RV3DMatrixStore * | ED_view3d_mats_rv3d_backup (RegionView3D *rv3d) |
| void | ED_view3d_mats_rv3d_restore (RegionView3D *rv3d, RV3DMatrixStore *rv3dmat) |
| void | ED_view3D_mats_rv3d_free (RV3DMatrixStore *rv3d_mat) |
| RenderEngineType * | ED_view3d_engine_type (const Scene *scene, int drawtype) |
| bool | ED_view3d_context_activate (bContext *C) |
| void | ED_view3d_draw_setup_view (const wmWindowManager *wm, wmWindow *win, Depsgraph *depsgraph, Scene *scene, ARegion *region, View3D *v3d, const float viewmat[4][4], const float winmat[4][4], const rcti *rect) |
| Base * | ED_view3d_give_base_under_cursor (bContext *C, const int mval[2]) |
| Object * | ED_view3d_give_object_under_cursor (bContext *C, const int mval[2]) |
| Object * | ED_view3d_give_material_slot_under_cursor (bContext *C, const int mval[2], int *r_material_slot) |
| bool | ED_view3d_is_object_under_cursor (bContext *C, const int mval[2]) |
| void | ED_view3d_quadview_update (ScrArea *area, ARegion *region, bool do_clip) |
| void | ED_view3d_update_viewmat (const Depsgraph *depsgraph, const Scene *scene, View3D *v3d, ARegion *region, const float viewmat[4][4], const float winmat[4][4], const rcti *rect, bool offscreen) |
| bool | ED_view3d_quat_from_axis_view (char view, char view_axis_roll, float r_quat[4]) |
| bool | ED_view3d_quat_to_axis_view (const float quat[4], float epsilon, char *r_view, char *r_view_axis_roll) |
| bool | ED_view3d_quat_to_axis_view_and_reset_quat (float quat[4], float epsilon, char *r_view, char *r_view_axis_roll) |
| char | ED_view3d_lock_view_from_index (int index) |
| char | ED_view3d_axis_view_opposite (char view) |
| bool | ED_view3d_lock (RegionView3D *rv3d) |
| void | ED_view3d_datamask (const Scene *scene, ViewLayer *view_layer, const View3D *v3d, CustomData_MeshMasks *r_cddata_masks) |
| void | ED_view3d_screen_datamask (const Scene *scene, ViewLayer *view_layer, const bScreen *screen, CustomData_MeshMasks *r_cddata_masks) |
| bool | ED_view3d_offset_lock_check (const View3D *v3d, const RegionView3D *rv3d) |
| void | ED_view3d_persp_switch_from_camera (const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d, char persp) |
| bool | ED_view3d_persp_ensure (const Depsgraph *depsgraph, View3D *v3d, ARegion *region) |
| bool | ED_view3d_camera_view_zoom_scale (RegionView3D *rv3d, const float scale) |
| bool | ED_view3d_camera_view_pan (ARegion *region, const float event_ofs[2]) |
| bool | ED_view3d_camera_lock_check (const View3D *v3d, const RegionView3D *rv3d) |
| void | ED_view3d_camera_lock_init_ex (const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d, bool calc_dist) |
| void | ED_view3d_camera_lock_init (const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d) |
| bool | ED_view3d_camera_lock_sync (const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d) |
| bool | ED_view3d_camera_autokey (const Scene *scene, ID *id_key, bContext *C, bool do_rotate, bool do_translate) |
| bool | ED_view3d_camera_lock_autokey (View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate) |
| void | ED_view3d_lock_clear (View3D *v3d) |
| bool | ED_view3d_camera_lock_undo_test (const View3D *v3d, const RegionView3D *rv3d, bContext *C) |
| bool | ED_view3d_camera_lock_undo_push (const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C) |
| bool | ED_view3d_camera_lock_undo_grouped_push (const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C) |
| float | ED_view3d_offset_distance (const float mat[4][4], const float ofs[3], float fallback_dist) |
| void | ED_view3d_distance_set (RegionView3D *rv3d, float dist) |
| bool | ED_view3d_distance_set_from_location (RegionView3D *rv3d, const float dist_co[3], float dist_min) |
| float | ED_scene_grid_scale (const Scene *scene, const char **r_grid_unit) |
| float | ED_view3d_grid_scale (const Scene *scene, const View3D *v3d, const char **r_grid_unit) |
| void | ED_view3d_grid_steps (const Scene *scene, const View3D *v3d, const RegionView3D *rv3d, float r_grid_steps[8]) |
| float | ED_view3d_grid_view_scale (const Scene *scene, const View3D *v3d, const ARegion *region, const char **r_grid_unit) |
| void | ED_scene_draw_fps (const Scene *scene, int xoffset, int *yoffset) |
| void | ED_view3d_stop_render_preview (wmWindowManager *wm, ARegion *region) |
| void | ED_view3d_shade_update (Main *bmain, View3D *v3d, ScrArea *area) |
| void | ED_view3d_gizmo_mesh_preselect_get_active (const bContext *C, const wmGizmo *gz, Base **r_base, BMElem **r_ele) |
| void | ED_view3d_gizmo_mesh_preselect_clear (wmGizmo *gz) |
| void | ED_view3d_gizmo_ruler_remove_by_gpencil_layer (struct bContext *C, bGPDlayer *gpl) |
| void | ED_view3d_buttons_region_layout_ex (const bContext *C, ARegion *region, const char *category_override) |
| bool | ED_localview_exit_if_empty (const Depsgraph *depsgraph, Scene *scene, ViewLayer *view_layer, wmWindowManager *wm, wmWindow *win, View3D *v3d, ScrArea *area, bool frame_selected=true, int smooth_viewtx=0) |
| bool | ED_view3d_local_collections_set (const Main *bmain, View3D *v3d) |
| void | ED_view3d_local_collections_reset (const bContext *C, bool reset_all) |
| #define IS_CLIPPED 12000 |
Definition at line 252 of file ED_view3d.hh.
Referenced by do_circle_select_armature__doSelectBone(), do_circle_select_pose__doSelectBone(), do_lasso_select_armature__doSelectBone(), do_lasso_select_curve__doSelect(), do_lasso_select_lattice__doSelect(), do_lasso_select_mesh__doSelectEdge_pass0(), do_lasso_select_mesh__doSelectEdge_pass1(), do_lasso_select_mesh__doSelectFace(), do_lasso_select_mesh__doSelectVert(), do_lasso_select_meshobject__doSelectVert(), DRW_text_cache_draw(), drw_text_cache_draw_ex(), PE_lasso_select(), blender::ed::pointcloud::select_lasso(), blender::ed::curves::select_lasso_mask(), and view3d_project_segment_to_screen_with_clip_tag().
| #define OVERLAY_RETOPOLOGY_ENABLED | ( | overlay | ) |
Definition at line 1366 of file ED_view3d.hh.
| #define OVERLAY_RETOPOLOGY_MIN_OFFSET FLT_EPSILON |
Definition at line 1372 of file ED_view3d.hh.
| #define OVERLAY_RETOPOLOGY_OFFSET | ( | overlay | ) |
Definition at line 1375 of file ED_view3d.hh.
| #define RETOPOLOGY_ENABLED | ( | v3d | ) |
Definition at line 1380 of file ED_view3d.hh.
Referenced by blender::draw::edit_select::Instance::begin_sync(), DRW_draw_select_id(), and DRW_object_is_renderable().
| #define RETOPOLOGY_OFFSET | ( | v3d | ) |
Definition at line 1381 of file ED_view3d.hh.
Referenced by blender::draw::edit_select::Instance::begin_sync(), and blender::draw::overlay::Meshes::begin_sync().
| #define SHADING_XRAY_ACTIVE | ( | shading | ) |
Definition at line 1350 of file ED_view3d.hh.
| #define SHADING_XRAY_ALPHA | ( | shading | ) |
Definition at line 1343 of file ED_view3d.hh.
Referenced by blender::workbench::SceneState::init().
| #define SHADING_XRAY_ENABLED | ( | shading | ) |
Definition at line 1348 of file ED_view3d.hh.
Referenced by blender::workbench::SceneState::init().
| #define SHADING_XRAY_FLAG | ( | shading | ) |
Definition at line 1345 of file ED_view3d.hh.
| #define SHADING_XRAY_FLAG_ENABLED | ( | shading | ) |
Definition at line 1347 of file ED_view3d.hh.
Referenced by blender::draw::overlay::Instance::init().
| #define USE_SNAP_DETECT_FROM_KEYMAP_HACK |
Definition at line 328 of file ED_view3d.hh.
| #define V3D_PROJ_TEST_ALL |
| #define V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT |
Definition at line 315 of file ED_view3d.hh.
Referenced by armature_circle_select(), do_lasso_select_armature(), do_lasso_select_mesh(), do_lasso_tag_pose(), do_mesh_box_select(), EDBM_edge_find_nearest_ex(), mesh_circle_select(), and pose_circle_select().
| #define V3D_PROJ_TEST_CLIP_DEFAULT (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) |
Definition at line 309 of file ED_view3d.hh.
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(), ED_curve_pick_vert_ex(), ed_mesh_pick_vert__mapFunc(), ED_view3d_project_base(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), EDBM_vert_find_nearest_ex(), findnearestLattvert(), lattice_circle_select(), mball_circle_select(), mesh_circle_select(), mouse_select_object_center(), nurbscurve_circle_select(), object_circle_select(), paint_vertsel_circle_select(), and pose_circle_select().
| #define VIEW3D_DIST_FALLBACK 1.0f |
Definition at line 1281 of file ED_view3d.hh.
Referenced by ED_view3d_camera_lock_init_ex(), ED_view3d_persp_switch_from_camera(), and ED_view3d_smooth_view_ex().
| #define VIEW3D_MARGIN 1.4f |
Definition at line 1280 of file ED_view3d.hh.
Referenced by view3d_from_minmax(), and view3d_localview_init().
| #define XRAY_ACTIVE | ( | v3d | ) |
Definition at line 1364 of file ED_view3d.hh.
Referenced by ed_view3d_give_base_under_cursor_ex(), get_nearest_editbonepoint(), blender::draw::overlay::Instance::init(), mixed_bones_object_selectbuffer_extended(), and view3d_gpu_select_ex().
| #define XRAY_ALPHA | ( | v3d | ) |
Definition at line 1353 of file ED_view3d.hh.
Referenced by blender::draw::gpencil::Instance::init(), and blender::draw::overlay::Instance::init().
| #define XRAY_ENABLED | ( | v3d | ) |
Checks X-ray is enabled and the alpha is less than one.
Definition at line 1363 of file ED_view3d.hh.
Referenced by blender::draw::edit_select::Instance::begin_sync(), blender::ed::transform::calcEdgeSlide_mval_range(), do_lasso_select_paintvert(), do_paintvert_box_select(), draw_primitive_view(), DRW_draw_select_id(), ED_view3d_has_depth_buffer_updated(), ed_wpaint_vertex_select_pick(), DRWContext::enable_engines(), blender::draw::gpencil::Instance::init(), key_test_depth(), paint_vertsel_circle_select(), PE_set_view3d_data(), blender::ed::transform::snap_object_project_view3d_ex(), validate_object_select_id(), and view3d_gpu_select_ex().
| #define XRAY_FLAG | ( | v3d | ) |
Definition at line 1354 of file ED_view3d.hh.
| #define XRAY_FLAG_ENABLED | ( | v3d | ) |
Definition at line 1355 of file ED_view3d.hh.
Referenced by blender::draw::overlay::Armatures::begin_sync(), do_lasso_select_mesh(), do_mesh_box_select(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), EDBM_vert_find_nearest_ex(), mesh_circle_select(), and blender::ed::transform::snapMesh().
| enum eV3DCursorOrient |
| Enumerator | |
|---|---|
| V3D_CURSOR_ORIENT_NONE | |
| V3D_CURSOR_ORIENT_VIEW | |
| V3D_CURSOR_ORIENT_XFORM | |
| V3D_CURSOR_ORIENT_GEOM | |
Definition at line 94 of file ED_view3d.hh.
Definition at line 188 of file ED_view3d.hh.
| enum eV3DProjStatus |
| Enumerator | |
|---|---|
| V3D_PROJ_RET_OK | |
| V3D_PROJ_RET_CLIP_NEAR | Can't avoid this when in perspective mode, (can't avoid) |
| V3D_PROJ_RET_CLIP_FAR | After clip_end. |
| V3D_PROJ_RET_CLIP_ZERO | Set when the coordinate is so close to the view-point that the projection isn't usable. Where there is potential numeric error in the resulting 2D value. This can be used to numeric errors even in cases where the caller* wishes to ignore the near clipping plane. |
| V3D_PROJ_RET_CLIP_BB | Bounding box clip - RV3D_CLIPPING |
| V3D_PROJ_RET_CLIP_WIN | Outside window bounds. |
| V3D_PROJ_RET_OVERFLOW | Outside range (mainly for short), (can't avoid) |
Definition at line 255 of file ED_view3d.hh.
| 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 | |
| V3D_PROJ_TEST_CLIP_CONTENT | Clip the contents of the data being iterated over. Currently this is only used to edges when projecting into screen space. Clamp the edge within the viewport limits defined by V3D_PROJ_TEST_CLIP_WIN, V3D_PROJ_TEST_CLIP_NEAR & V3D_PROJ_TEST_CLIP_FAR. This resolves the problem of a visible edge having one of it's vertices behind the viewport. See: #32214. This is not default behavior as it may be important for the screen-space location of an edges vertex to represent that vertices location (instead of a location along the edge).
Use V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT instead of V3D_PROJ_TEST_CLIP_CONTENT, to avoid accidentally enabling near clipping without clipping by window bounds. |
Definition at line 278 of file ED_view3d.hh.
| enum eV3DSelectMode |
| Enumerator | |
|---|---|
| VIEW3D_SELECT_ALL | |
| VIEW3D_SELECT_PICK_ALL | |
| VIEW3D_SELECT_PICK_NEAREST | |
Definition at line 979 of file ED_view3d.hh.
| 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 988 of file ED_view3d.hh.
| enum eV3DSnapCursor |
| Enumerator | |
|---|---|
| V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE | |
| V3D_SNAPCURSOR_OCCLUSION_ALWAYS_TRUE | |
| V3D_SNAPCURSOR_OCCLUSION_ALWAYS_FALSE | |
| V3D_SNAPCURSOR_SNAP_EDIT_GEOM_FINAL | |
| V3D_SNAPCURSOR_SNAP_EDIT_GEOM_CAGE | |
Definition at line 329 of file ED_view3d.hh.
| void armature_foreachScreenBone | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, EditBone *ebone, const float screen_co_a[2], const float screen_co_b[2]), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
ED_view3d_init_mats_rv3d must be called first.
Definition at line 769 of file view3d_iterators.cc.
References blender::animrig::bone_is_visible(), content_planes_from_clip_flag(), Object::data, ED_view3d_check_mats_rv3d(), bArmature::edbo, EditBone::head, LISTBASE_FOREACH, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, EditBone::tail, V3D_PROJ_TEST_CLIP_CONTENT, view3d_project_segment_to_screen_with_clip_tag(), view3d_project_segment_to_screen_with_content_clip_planes(), ARegion::winx, ARegion::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by armature_circle_select(), and do_lasso_select_armature().
| bool ED_localview_exit_if_empty | ( | const Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| wmWindowManager * | wm, | ||
| wmWindow * | win, | ||
| View3D * | v3d, | ||
| ScrArea * | area, | ||
| bool | frame_selected = true, | ||
| int | smooth_viewtx = 0 ) |
Exit 'local view' of given View3D editor, if it is active and there is nothing to display in it anymore.
| depsgraph | Optional, only required for #frame_selected. |
| frame_selected | Frame the newly out-of-local view to show currently visible selected objects. Will only do something if a valid depsgraph pointer is also provided. |
| smooth_viewtx | Smooth transition time (in milliseconds) between current view and final view, if changes are happening. Currently only used if #frame_selected is enabled. |
Definition at line 1032 of file view3d_view.cc.
References BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), depsgraph, View3D_Runtime::flag, LISTBASE_FOREACH, View3D::local_view_uid, View3D::localvd, View3D::runtime, V3D_RUNTIME_LOCAL_MAYBE_EMPTY, and view3d_localview_exit().
Referenced by localview_remove_from_exec(), and space_view3d_refresh().
| bool ED_operator_rv3d_user_region_poll | ( | bContext * | C | ) |
Definition at line 284 of file view3d_view.cc.
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 Scene * | scene, |
| int | xoffset, | ||
| int * | yoffset ) |
Definition at line 2758 of file view3d_draw.cc.
References BLF_color4fv(), BLF_default(), BLF_draw_default(), ED_scene_fps_average_calc(), hsv_to_rgb_v(), IFACE_, rgb_to_hsv_v(), SNPRINTF_UTF8, state, TH_REDALERT, UI_GetThemeColor4fv(), and VIEW3D_OVERLAY_LINEHEIGHT.
Referenced by blender::ed::vse::sequencer_preview_draw_overlays(), and view3d_draw_region_info().
Could move this elsewhere, but tied into ED_view3d_grid_scale
Definition at line 839 of file view3d_draw.cc.
References B_UNIT_LENGTH, BKE_unit_base_get(), BKE_unit_display_name_get(), BKE_unit_scalar_get(), BKE_unit_system_get(), float, i, IFACE_, len, UnitSettings::scale_length, UnitSettings::system, and Scene::unit.
Referenced by ED_view3d_grid_scale(), blender::ed::object::new_primitive_matrix(), blender::ed::object::object_camera_add_exec(), and WM_operator_view3d_unit_defaults().
Similar to ED_view3d_context_user_region() but does not use context. Always performs a lookup. Also works if v3d is not the active space.
Definition at line 84 of file space_view3d.cc.
References BLI_assert, ELEM, ListBase::first, LISTBASE_FOREACH, RegionView3D::persp, ScrArea::regionbase, View3D::regionbase, RGN_TYPE_WINDOW, RV3D_CAMOB, RV3D_LOCK_ROTATION, RV3D_PERSP, SPACE_VIEW3D, ScrArea::spacedata, View3D::spacetype, and RegionView3D::viewlock.
Referenced by ED_view3d_context_user_region().
| bool ED_view3d_autodist | ( | ARegion * | region, |
| View3D * | v3d, | ||
| const int | mval[2], | ||
| float | mouse_worldloc[3], | ||
| const float | fallback_depth_pt[3] ) |
Get the world-space 3D location from a screen-space 2D point. It may be useful to call ED_view3d_depth_override before.
| mval | Input screen-space pixel location. |
| mouse_worldloc | Output world-space location. |
| fallback_depth_pt | Use this points depth when no depth can be found. |
Definition at line 1172 of file view3d_utils.cc.
References ARRAY_SIZE, ED_view3d_unproject_v3(), ED_view3d_win_to_3d_int(), float, FLT_MAX, i, U, and view_autodist_depth_margin().
Referenced by depthdropper_depth_sample_pt(), ED_view3d_cursor3d_position(), navigate_pivot_get(), paint_proj_stroke(), and viewcenter_pick_invoke().
Check if the last auto-dist can be used.
Definition at line 1092 of file view3d_utils.cc.
References wmEvent::flag, view3d_autodepth_last_id, WM_event_consecutive_data_get(), and WM_EVENT_IS_CONSECUTIVE.
Referenced by navigate_pivot_get().
| void ED_view3d_autodist_last_clear | ( | wmWindow * | win | ) |
Clear and free auto-dist data.
Definition at line 1104 of file view3d_utils.cc.
References WM_event_consecutive_data_free().
Referenced by ED_view3d_autodist_last_set(), and navigate_pivot_get().
Definition at line 1127 of file view3d_utils.cc.
References BLI_assert, copy_v3_v3(), View3D_AutoDistLast::has_depth, View3D_AutoDistLast::ofs, view3d_autodepth_last_id, WM_event_consecutive_data_get(), and zero_v3().
Referenced by navigate_pivot_get().
| void ED_view3d_autodist_last_set | ( | wmWindow * | win, |
| const wmEvent * | event, | ||
| const float | ofs[3], | ||
| const bool | has_depth ) |
Definition at line 1109 of file view3d_utils.cc.
References copy_v3_v3(), ED_view3d_autodist_last_clear(), View3D_AutoDistLast::has_depth, MEM_callocN(), View3D_AutoDistLast::ofs, view3d_autodepth_last_id, WM_event_consecutive_data_set(), and WM_event_consecutive_gesture_test().
Referenced by navigate_pivot_get().
| bool ED_view3d_autodist_simple | ( | ARegion * | region, |
| const int | mval[2], | ||
| float | mouse_worldloc[3], | ||
| int | margin, | ||
| const float * | force_depth ) |
No 4x4 sampling, run ED_view3d_depth_override first.
Definition at line 1205 of file view3d_utils.cc.
References ED_view3d_unproject_v3(), float, FLT_MAX, and view_autodist_depth_margin().
Referenced by annotation_stroke_convertcoords(), and blender::ed::object::object_transfer_mode_reposition_view_pivot().
| char ED_view3d_axis_view_opposite | ( | char | view | ) |
Definition at line 1576 of file view3d_utils.cc.
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().
allow for small values [0.5 - 2.5], and large values, FLT_MAX by clamping by the area size
Definition at line 2390 of file view3d_draw.cc.
References ceilf, max_ii(), min_ff(), ARegion::winx, and ARegion::winy.
Referenced by EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), and EDBM_vert_find_nearest_ex().
Definition at line 70 of file view3d_utils.cc.
References View3DShading::background_color, View3DShading::background_type, copy_v3_v3(), World::horr, View3D::shading, TH_BACK, UI_GetThemeColor3fv(), V3D_SHADING_BACKGROUND_VIEWPORT, V3D_SHADING_BACKGROUND_WORLD, and Scene::world.
Referenced by blender::draw::gpencil::Instance::draw(), ED_view3d_text_colors_get(), and gizmo_axis_draw().
| void ED_view3d_buttons_region_layout_ex | ( | const bContext * | C, |
| ARegion * | region, | ||
| const char * | category_override ) |
Definition at line 1143 of file space_view3d.cc.
References ARRAY_SET_ITEMS, BKE_regiontype_from_id(), BKE_spacetype_from_id(), C, CTX_data_mode_enum(), CTX_data_mode_string(), CTX_MODE_EDIT_ARMATURE, CTX_MODE_EDIT_CURVE, CTX_MODE_EDIT_CURVES, CTX_MODE_EDIT_GPENCIL_LEGACY, CTX_MODE_EDIT_GREASE_PENCIL, CTX_MODE_EDIT_LATTICE, CTX_MODE_EDIT_MESH, CTX_MODE_EDIT_METABALL, CTX_MODE_EDIT_POINTCLOUD, CTX_MODE_EDIT_SURFACE, CTX_MODE_EDIT_TEXT, CTX_MODE_OBJECT, CTX_MODE_PAINT_GPENCIL_LEGACY, CTX_MODE_PAINT_GREASE_PENCIL, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_PARTICLE, CTX_MODE_POSE, CTX_MODE_SCULPT, CTX_MODE_SCULPT_CURVES, CTX_MODE_SCULPT_GPENCIL_LEGACY, CTX_MODE_SCULPT_GREASE_PENCIL, CTX_MODE_VERTEX_GPENCIL_LEGACY, CTX_MODE_VERTEX_GREASE_PENCIL, CTX_MODE_WEIGHT_GPENCIL_LEGACY, CTX_MODE_WEIGHT_GREASE_PENCIL, ED_region_panels_layout_ex(), blender::wm::InvokeRegionWin, ARegionType::paneltypes, RGN_TYPE_UI, ARegion::runtime, and SPACE_VIEW3D.
Referenced by buttons_main_region_layout(), and view3d_buttons_region_layout().
| void ED_view3d_calc_camera_border | ( | const Scene * | scene, |
| const Depsgraph * | depsgraph, | ||
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| bool | no_shift, | ||
| rctf * | r_viewborder ) |
Definition at line 443 of file view3d_draw.cc.
References depsgraph, and view3d_camera_border().
Referenced by annotation_paint_initstroke(), drawFlyPixel(), drawviewborder(), drawWalkPixel(), ED_annotation_draw_view3d(), ED_view3d_calc_render_border(), ED_view3d_update_viewmat(), blender::draw::compositor_engine::Context::get_compositing_region(), blender::eevee::Instance::init(), initFlyInfo(), blender::io::grease_pencil::GreasePencilExporter::prepare_render_params(), blender::ed::transform::projectFloatViewCenterFallback(), render_border_exec(), view_zoom_to_window_xy_camera(), and WIDGETGROUP_camera_view_draw_prepare().
| void ED_view3d_calc_camera_border_size | ( | const Scene * | scene, |
| Depsgraph * | depsgraph, | ||
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| float | r_size[2] ) |
Definition at line 429 of file view3d_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), depsgraph, and view3d_camera_border().
Referenced by view3d_center_camera_exec(), and view3d_set_1_to_1_viewborder().
| float ED_view3d_calc_depth_for_comparison | ( | const RegionView3D * | rv3d, |
| const float | co[3] ) |
Calculate a depth value from co (result should only be used for comparison).
Definition at line 316 of file view3d_project.cc.
References dot_v3v3(), RegionView3D::is_persp, mul_project_m4_v3_zfac(), RegionView3D::persmat, and RegionView3D::viewinv.
Referenced by annotation_stroke_eraser_is_occluded().
| bool ED_view3d_calc_render_border | ( | const Scene * | scene, |
| Depsgraph * | depsgraph, | ||
| View3D * | v3d, | ||
| ARegion * | region, | ||
| rcti * | r_rect ) |
Definition at line 2812 of file view3d_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_translate(), RenderData::border, depsgraph, ED_view3d_calc_camera_border(), View3D::flag2, RenderData::mode, OB_RENDER, RegionView3D::persp, Scene::r, R_BORDER, ARegion::regiondata, View3D::render_border, RV3D_CAMOB, View3D::shading, View3DShading::type, V3D_RENDER_BORDER, view3d_main_region_do_render_draw(), ARegion::winrct, ARegion::winx, ARegion::winy, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by wm_region_test_render_do_draw().
| float ED_view3d_calc_zfac | ( | const RegionView3D * | rv3d, |
| const float | co[3] ) |
See ED_view3d_calc_zfac_ex doc-string.
Definition at line 311 of file view3d_project.cc.
References ED_view3d_calc_zfac_ex().
Referenced by annotation_stroke_convertcoords(), brush_edit_init(), blender::ed::sculpt_paint::calc_local_from_screen(), blender::ed::transform::calculateZfac(), ED_view3d_cursor3d_position(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), ViewOpsData::init_navigation(), mesh_bisect_interactive_calc(), move3d_get_translate(), paint_calc_object_space_radius(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::io::grease_pencil::GreasePencilExporter::retrieve_objects(), view3d_zoom_border_exec(), and view_zoom_to_window_xy_3d().
| float ED_view3d_calc_zfac_ex | ( | const RegionView3D * | rv3d, |
| const float | co[3], | ||
| bool * | r_flip ) |
Calculate a depth value from co, use with ED_view3d_win_to_delta.
| r_flip | Set to zfac < 0.0 before the value is made signed. Since it's important in some cases to know if the value was flipped. |
Definition at line 288 of file view3d_project.cc.
References mul_project_m4_v3_zfac(), and RegionView3D::persmat.
Referenced by ED_view3d_calc_zfac(), ED_view3d_cursor3d_position(), and blender::ed::sculpt_paint::project_brush_radius_grease_pencil().
| bool ED_view3d_camera_autokey | ( | const Scene * | scene, |
| ID * | id_key, | ||
| bContext * | C, | ||
| bool | do_rotate, | ||
| bool | do_translate ) |
Definition at line 689 of file view3d_utils.cc.
References Vector< T, InlineBufferCapacity, Allocator >::append(), blender::animrig::autokeyframe_cfra_can_key(), blender::animrig::autokeyframe_object(), BLI_assert, C, GS, ID_OB, NA_ADDED, ID::name, NC_ANIMATION, ND_KEYFRAME, ROT_MODE_AXISANGLE, ROT_MODE_EUL, ROT_MODE_QUAT, Object::rotmode, and WM_main_add_notifier().
Referenced by ED_view3d_camera_lock_autokey(), and ED_view3d_cameracontrol_update().
| Camera * ED_view3d_camera_data_get | ( | View3D * | v3d, |
| RegionView3D * | rv3d ) |
Definition at line 142 of file view3d_utils.cc.
References View3D::camera, Object::data, 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, | ||
| bContext * | C, | ||
| bool | do_rotate, | ||
| bool | do_translate ) |
Call after modifying a locked view.
Definition at line 733 of file view3d_utils.cc.
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, and Object::transflag.
Referenced by view3d_smoothview_apply_and_finish_ex(), view3d_smoothview_apply_with_interp(), view_zoom_apply_step(), viewdolly_modal(), viewmove_invoke_impl(), viewmove_modal_impl(), viewroll_modal(), viewrotate_invoke_impl(), viewrotate_modal_impl(), viewzoom_invoke_impl(), and viewzoom_modal_impl().
| bool ED_view3d_camera_lock_check | ( | const View3D * | v3d, |
| const RegionView3D * | rv3d ) |
Definition at line 603 of file view3d_utils.cc.
References View3D::camera, View3D::flag2, ID_IS_EDITABLE, RegionView3D::persp, RV3D_CAMOB, and V3D_LOCK_CAMERA.
Referenced by ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_init_ex(), ED_view3d_camera_lock_sync(), ED_view3d_camera_lock_undo_test(), ED_view3d_persp_ensure(), ED_view3d_persp_switch_from_camera(), ViewOpsData::state_restore(), view3d_calc_minmax_selected(), view3d_calc_minmax_visible(), view3d_from_minmax(), view3d_from_minmax_multi(), view3d_zoom_border_exec(), view_zoom_apply_step(), viewmove_apply(), vieworbit_exec(), viewroll_exec(), and viewzoom_apply().
| void ED_view3d_camera_lock_init | ( | const Depsgraph * | depsgraph, |
| View3D * | v3d, | ||
| RegionView3D * | rv3d ) |
Definition at line 625 of file view3d_utils.cc.
References depsgraph, and ED_view3d_camera_lock_init_ex().
Referenced by ED_view3d_smooth_view_ex(), and view3d_zoom_border_exec().
| void ED_view3d_camera_lock_init_ex | ( | const Depsgraph * | depsgraph, |
| View3D * | v3d, | ||
| RegionView3D * | rv3d, | ||
| bool | calc_dist ) |
Copy the camera to the view before starting a view transformation.
Apply the camera object transformation to the 3D Viewport. (needed so we can use regular 3D Viewport manipulation operators, that sync back to the camera).
Definition at line 609 of file view3d_utils.cc.
References View3D::camera, DEG_get_evaluated(), depsgraph, RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_from_object(), ED_view3d_offset_distance(), RegionView3D::ofs, VIEW3D_DIST_FALLBACK, and RegionView3D::viewquat.
Referenced by ED_view3d_camera_lock_init(), and ViewOpsData::init_navigation().
| bool ED_view3d_camera_lock_sync | ( | const Depsgraph * | depsgraph, |
| View3D * | v3d, | ||
| RegionView3D * | rv3d ) |
Copy the view to the camera, return true if.
Apply the 3D Viewport transformation back to the camera object.
Definition at line 630 of file view3d_utils.cc.
References BKE_object_apply_mat4(), BKE_object_tfm_protected_backup(), BKE_object_tfm_protected_restore(), View3D::camera, DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_to_m4(), ED_view3d_to_object(), Object::id, ID_RECALC_TRANSFORM, invert_m4_m4(), mul_m4_m4m4(), NC_OBJECT, ND_TRANSFORM, normalize_m4_m4(), OB_LOCK_SCALEX, OB_LOCK_SCALEY, OB_LOCK_SCALEZ, OB_TRANSFORM_ADJUST_ROOT_PARENT_FOR_VIEW_LOCK, RegionView3D::ofs, Object::parent, Object::protectflag, Object::transflag, RegionView3D::viewquat, and WM_main_add_notifier().
Referenced by ED_view3d_smooth_view_ex(), ViewOpsData::state_restore(), view3d_smoothview_apply_and_finish_ex(), view3d_smoothview_apply_with_interp(), view_zoom_apply_step(), viewdolly_apply(), viewdolly_exec(), viewmove_apply(), viewroll_apply(), viewrotate_apply(), and viewzoom_apply_3d().
| bool ED_view3d_camera_lock_undo_grouped_push | ( | const char * | str, |
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| bContext * | C ) |
A version of ED_view3d_camera_lock_undo_push that performs a grouped undo push.
Definition at line 802 of file view3d_utils.cc.
References C, str, and view3d_camera_lock_undo_ex().
Referenced by ED_view3d_smooth_view_undo_end(), and viewzoom_exec().
| bool ED_view3d_camera_lock_undo_push | ( | const char * | str, |
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| bContext * | C ) |
Create an undo step when the camera is locked to the view.
| str | The name of the undo step (typically wmOperatorType.name should be used). |
Definition at line 794 of file view3d_utils.cc.
References C, str, and view3d_camera_lock_undo_ex().
Referenced by ED_view3d_smooth_view_undo_end(), fly_modal(), view3d_navigate_modal_fn(), viewdolly_modal(), and walk_modal().
| bool ED_view3d_camera_lock_undo_test | ( | const View3D * | v3d, |
| const RegionView3D * | rv3d, | ||
| bContext * | C ) |
Check if creating an undo step should be performed if the viewport moves.
Definition at line 758 of file view3d_utils.cc.
References C, ED_undo_is_memfile_compatible(), and ED_view3d_camera_lock_check().
Referenced by ED_view3d_smooth_view_undo_begin(), ED_view3d_smooth_view_undo_end(), and view3d_camera_lock_undo_ex().
| bool ED_view3d_camera_to_view_selected | ( | Main * | bmain, |
| Depsgraph * | depsgraph, | ||
| const Scene * | scene, | ||
| Object * | camera_ob ) |
Definition at line 1715 of file view3d_utils.cc.
References depsgraph, and view3d_camera_to_view_selected_impl().
Referenced by view3d_camera_to_view_selected_exec().
| bool ED_view3d_camera_to_view_selected_with_set_clipping | ( | Main * | bmain, |
| Depsgraph * | depsgraph, | ||
| const Scene * | scene, | ||
| Object * | camera_ob ) |
Definition at line 1723 of file view3d_utils.cc.
References Object::data, DEG_get_evaluated(), depsgraph, and view3d_camera_to_view_selected_impl().
Referenced by object_preview_scene_create().
Utility to pan when in camera view.
| event_ofs | The offset the pan in screen (pixel) coordinates. |
Definition at line 583 of file view3d_utils.cc.
References BKE_screen_view3d_zoom_to_fac(), RegionView3D::camdx, RegionView3D::camdy, RegionView3D::camzoom, CLAMP, ARegion::regiondata, ARegion::winx, and ARegion::winy.
Referenced by viewmove_apply().
| bool ED_view3d_camera_view_zoom_scale | ( | RegionView3D * | rv3d, |
| const float | scale ) |
Utility to scale zoom level when in camera-view RegionView3D.camzoom and apply limits.
Definition at line 570 of file view3d_utils.cc.
References BKE_screen_view3d_zoom_from_fac(), BKE_screen_view3d_zoom_to_fac(), RegionView3D::camzoom, CLAMP, RV3D_CAMZOOM_MAX, RV3D_CAMZOOM_MAX_FACTOR, RV3D_CAMZOOM_MIN, and RV3D_CAMZOOM_MIN_FACTOR.
| void ED_view3d_check_mats_rv3d | ( | RegionView3D * | rv3d | ) |
Definition at line 149 of file space_view3d.cc.
References BLI_ASSERT_ZERO_M4, RegionView3D::persmatob, and RegionView3D::viewmatob.
Referenced by armature_foreachScreenBone(), ED_view3d_project_float_object(), ED_view3d_project_int_object(), ED_view3d_project_short_object(), lattice_foreachScreenVert(), mball_foreachScreenElem(), mesh_foreachScreenEdge(), mesh_foreachScreenEdge_clip_bb_segment(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), meshobject_foreachScreenVert(), nurbs_foreachScreenVert(), and pose_foreachScreenBone().
| void ED_view3d_clear_mats_rv3d | ( | RegionView3D * | rv3d | ) |
Ensure we correctly initialize.
Definition at line 143 of file space_view3d.cc.
References RegionView3D::persmatob, RegionView3D::viewmatob, and zero_m4().
| bool ED_view3d_clip_range_get | ( | const Depsgraph * | depsgraph, |
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| bool | use_ortho_factor, | ||
| float * | r_clip_start, | ||
| float * | r_clip_end ) |
Definition at line 165 of file view3d_utils.cc.
References BKE_camera_params_from_view3d(), BKE_camera_params_init(), depsgraph, and params.
Referenced by knife_recalc_ortho(), proj_paint_state_viewport_init(), texture_paint_image_from_view_exec(), and view3d_win_to_ray_segment().
| bool ED_view3d_clip_segment | ( | const RegionView3D * | rv3d, |
| float | ray_start[3], | ||
| float | ray_end[3] ) |
Definition at line 362 of file view3d_project.cc.
References RegionView3D::clip, clip_segment_v3_plane_n(), RegionView3D::rflag, and RV3D_CLIPPING.
Referenced by ED_view3d_win_to_ray_clipped_ex(), and ED_view3d_win_to_segment_clipped().
| void ED_view3d_clipping_calc | ( | BoundBox * | bb, |
| float | planes[4][4], | ||
| const ARegion * | region, | ||
| const Object * | ob, | ||
| const rcti * | rect ) |
Definition at line 319 of file view3d_utils.cc.
References ED_view3d_clipping_calc_from_boundbox(), ED_view3d_unproject_v3(), ELEM, invert_m4_m4(), is_negative_m4(), mul_m4_v3(), BoundBox::vec, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by DRW_text_edit_mesh_measure_stats(), blender::ed::sculpt_paint::gesture::init_from_box(), blender::ed::sculpt_paint::gesture::init_from_lasso(), and view3d_clipping_exec().
Definition at line 305 of file view3d_utils.cc.
References dot_v3v3(), negate_v3(), normal_tri_v3(), UNLIKELY, and BoundBox::vec.
Referenced by calc_local_clipping(), and ED_view3d_clipping_calc().
| bool ED_view3d_clipping_clamp_minmax | ( | const RegionView3D * | rv3d, |
| float | min[3], | ||
| float | max[3] ) |
Clamp min/max by the viewport clipping.
Definition at line 372 of file view3d_utils.cc.
References RegionView3D::clip, copy_v3_v3(), i, INIT_MINMAX, isect_planes_v3_fn(), max, PointsInPlanesMinMax_UserData::max, min, PointsInPlanesMinMax_UserData::min, negate_v4_v4(), points_in_planes_minmax_fn(), RV3D_BOXCLIP, RV3D_LOCK_FLAGS, and zero_v3().
Referenced by view3d_calc_minmax_selected(), and view3d_calc_minmax_visible().
| void ED_view3d_clipping_local | ( | RegionView3D * | rv3d, |
| const float | mat[4][4] ) |
Definition at line 772 of file view3d_edit.cc.
References calc_local_clipping(), RegionView3D::clip_local, RegionView3D::clipbb, RegionView3D::rflag, and RV3D_CLIPPING.
Referenced by 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 RegionView3D * | rv3d, |
| const float | co[3], | ||
| bool | is_local ) |
Return true when co is hidden by the 3D views clipping planes.
| is_local | When true use local (object-space) ED_view3d_clipping_local must run first, then all comparisons can be done in local-space. |
Definition at line 2300 of file view3d_draw.cc.
References RegionView3D::clip, RegionView3D::clip_local, and view3d_clipping_test().
Referenced by ed_view3d_project__internal(), blender::ed::sculpt_paint::filter_region_clip_factors(), blender::ed::sculpt_paint::filter_region_clip_factors(), find_nearest_edge__doClosest(), knife_bvh_raycast_cb(), 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(), and project_paint_occlude_ptv_clip().
| bool ED_view3d_context_activate | ( | bContext * | C | ) |
Definition at line 273 of file view3d_utils.cc.
References 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(), SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by screen_opengl_render_init().
| RegionView3D * ED_view3d_context_rv3d | ( | bContext * | C | ) |
Get 3D region from context, also if mouse is in header or toolbar.
Definition at line 90 of file view3d_context.cc.
References BKE_area_find_region_active_win(), C, CTX_wm_area(), CTX_wm_region_view3d(), ARegion::regiondata, SPACE_VIEW3D, and ScrArea::spacetype.
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().
Ideally would return an rv3d but in some cases the region is needed too so return that, the caller can then access the region->regiondata.
Definition at line 106 of file view3d_context.cc.
References C, CTX_wm_area(), CTX_wm_region(), ED_view3d_area_user_region(), ListBase::first, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_LOCK_ROTATION, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, 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 | ( | bContext * | C, |
| const int | mval[2], | ||
| bool | use_depth, | ||
| float | r_cursor_co[3] ) |
Cursor position in r_cursor_co, result in r_cursor_co, mval in region coords.
Definition at line 839 of file view3d_edit.cc.
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_calc_zfac_ex(), ED_view3d_depth_override(), ED_view3d_win_to_3d_int(), negate_v3_v3(), RegionView3D::ofs, ARegion::regiondata, V3D_DEPTH_ALL, and view3d_operator_needs_gpu().
Referenced by blender::ed::object::collection_add_info_get_from_op(), ED_view3d_cursor3d_position_rotation(), blender::ed::object::object_add_named_exec(), blender::ed::object::object_data_instance_add_exec(), blender::ed::object::object_image_add_invoke(), and blender::ed::object::object_transform_to_mouse_exec().
| void ED_view3d_cursor3d_position_rotation | ( | bContext * | C, |
| const int | mval[2], | ||
| bool | use_depth, | ||
| enum eV3DCursorOrient | orientation, | ||
| float | r_cursor_co[3], | ||
| float | r_cursor_quat[4] ) |
Definition at line 885 of file view3d_edit.cc.
References angle_normalized_qt(), axis_dominant_v3_ortho_single(), C, blender::ed::transform::calc_orientation_from_type(), copy_qt_qt(), copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), dot_v3v3(), ED_view3d_cursor3d_position(), float, mat3_to_quat(), mul_qt_qtqt(), mul_qt_v3(), negate_v3(), normalize_v3(), params, project_plane_v3_v3v3(), ARegion::regiondata, rotation_between_vecs_to_quat(), SCE_SNAP_TARGET_ALL, SCE_SNAP_TO_FACE, blender::ed::transform::SNAP_GEOM_FINAL, blender::ed::transform::snap_object_context_create(), blender::ed::transform::snap_object_context_destroy(), blender::ed::transform::snap_object_project_view3d_ex(), blender::ed::transform::SNAP_OCCLUSION_AS_SEEM, 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 | ( | bContext * | C, |
| const int | mval[2], | ||
| bool | use_depth, | ||
| enum eV3DCursorOrient | orientation ) |
Definition at line 1007 of file view3d_edit.cc.
References angle_signed_on_axis_v3v3_v3(), axis_angle_to_mat3(), 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_SYNC_TO_EVAL, 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(), ARegion::regiondata, RNA_pointer_create_discrete(), ROT_MODE_AXISANGLE, View3DCursor::rotation_angle, View3DCursor::rotation_axis, View3DCursor::rotation_mode, RV3D_VIEW_IS_AXIS, U, USER_LOCK_CURSOR_ADJUST, V3D_PROJ_RET_OK, V3D_PROJ_TEST_NOP, RegionView3D::view, blender::math::QuaternionBase< T >::w, 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().
| blender::ed::transform::SnapObjectContext * ED_view3d_cursor_snap_context_ensure | ( | Scene * | scene | ) |
Definition at line 1103 of file view3d_cursor_snap.cc.
References g_data_intern, SnapCursorDataIntern::snap_context_v3d, and v3d_cursor_snap_context_ensure().
Referenced by ED_gizmotypes_snap_3d_context_ensure().
| V3DSnapCursorData * ED_view3d_cursor_snap_data_get | ( | ) |
Definition at line 1097 of file view3d_cursor_snap.cc.
References g_data_intern, and SnapCursorDataIntern::snap_data.
Referenced by ED_gizmotypes_snap_3d_data_get(), ED_gizmotypes_snap_3d_is_enabled(), gizmo_snap_rna_location_get_fn(), gizmo_snap_rna_location_set_fn(), gizmo_snap_rna_normal_get_fn(), gizmo_snap_rna_snap_elem_index_get_fn(), gizmo_snap_rna_snap_srouce_type_get_fn(), gizmo_snap_rna_snap_srouce_type_set_fn(), snap_gizmo_test_select(), view3d_collection_drop_matrix_from_snap(), view3d_interactive_add_calc_snap(), and view3d_ob_drop_matrix_from_snap().
| void ED_view3d_cursor_snap_data_update | ( | V3DSnapCursorState * | state, |
| const bContext * | C, | ||
| const ARegion * | region, | ||
| const blender::int2 & | mval ) |
Definition at line 1078 of file view3d_cursor_snap.cc.
References C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_view3d(), CTX_wm_window(), DEG_get_input_scene(), depsgraph, ED_view3d_cursor_snap_state_active_get(), wmWindow::eventstate, g_data_intern, state, v3d_cursor_eventstate_has_changed(), and v3d_cursor_snap_update().
Referenced by ED_gizmotypes_snap_3d_data_get(), snap_gizmo_test_select(), and view3d_interactive_add_begin().
| void ED_view3d_cursor_snap_draw_util | ( | RegionView3D * | rv3d, |
| const float | source_loc[3], | ||
| const float | target_loc[3], | ||
| const eSnapMode | source_type, | ||
| const eSnapMode | target_type, | ||
| const uchar | source_color[4], | ||
| const uchar | target_color[4] ) |
Definition at line 423 of file view3d_cursor_snap.cc.
References cursor_point_draw(), ED_view3d_pixel_size(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immUniformColor4ubv(), immVertex3fv(), immVertexFormat(), pos, SCE_SNAP_TO_EDGE_PERPENDICULAR, TH_VERTEX_SIZE, U, and UI_GetThemeValuef().
Referenced by blender::ed::transform::drawSnapping(), and v3d_cursor_snap_draw_fn().
| V3DSnapCursorState * ED_view3d_cursor_snap_state_active_get | ( | ) |
Definition at line 947 of file view3d_cursor_snap.cc.
References BLI_listbase_is_empty(), g_data_intern, ListBase::last, and SnapCursorDataIntern::state_intern.
Referenced by ED_view3d_cursor_snap_data_update(), ED_view3d_cursor_snap_state_prevpoint_set(), gizmo_snap_state_from_rna_get(), v3d_cursor_snap_draw_fn(), v3d_cursor_snap_poll_fn(), view3d_collection_drop_copy_local_id(), view3d_interactive_add_begin(), and view3d_ob_drop_copy_local_id().
| void ED_view3d_cursor_snap_state_active_set | ( | V3DSnapCursorState * | state | ) |
Definition at line 956 of file view3d_cursor_snap.cc.
References BLI_addtail(), BLI_assert_unreachable, BLI_remlink_safe(), g_data_intern, state, and STATE_INTERN_GET.
Referenced by snap_gizmo_draw().
| V3DSnapCursorState * ED_view3d_cursor_snap_state_create | ( | ) |
Definition at line 1032 of file view3d_cursor_snap.cc.
References BLI_addtail(), g_data_intern, SnapCursorDataIntern::handle, MEM_mallocN(), SnapStateIntern::snap_state, and v3d_cursor_snap_activate().
Referenced by snap_gizmo_draw(), snap_gizmo_setup(), view3d_drop_snap_init(), view3d_interactive_add_begin(), and WIDGETGROUP_placement_setup().
| void ED_view3d_cursor_snap_state_default_set | ( | V3DSnapCursorState * | state | ) |
Definition at line 1018 of file view3d_cursor_snap.cc.
References g_data_intern, and state.
| void ED_view3d_cursor_snap_state_free | ( | V3DSnapCursorState * | state | ) |
Definition at line 1047 of file view3d_cursor_snap.cc.
References BLI_listbase_is_empty(), BLI_remlink(), g_data_intern, MEM_freeN(), state, SnapCursorDataIntern::state_intern, STATE_INTERN_GET, and v3d_cursor_snap_free().
Referenced by preview_plane_free_fn(), snap_cursor_free(), view3d_drop_snap_exit(), and view3d_interactive_add_exit().
| void ED_view3d_cursor_snap_state_prevpoint_set | ( | V3DSnapCursorState * | state, |
| const float | prev_point[3] ) |
Definition at line 1062 of file view3d_cursor_snap.cc.
References copy_v3_v3(), ED_view3d_cursor_snap_state_active_get(), g_data_intern, SnapCursorDataIntern::prevpoint_stack, and state.
Referenced by gizmo_snap_rna_prevpoint_set_fn(), view3d_interactive_add_begin(), and view3d_interactive_add_modal().
| void ED_view3d_datamask | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| const View3D * | v3d, | ||
| CustomData_MeshMasks * | r_cddata_masks ) |
Definition at line 2641 of file view3d_draw.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CD_MASK_MDEFORMVERT, CD_MASK_ORCO, CD_MASK_PROP_BYTE_COLOR, CD_MASK_PROP_COLOR, CD_MASK_PROP_FLOAT2, View3DShading::color_type, View3DOverlay::edit_flag, ELEM, CustomData_MeshMasks::lmask, Object::mode, OB_MATERIAL, OB_MESH, OB_MODE_EDIT, OB_RENDER, OB_SOLID, OB_TEXTURE, View3D::overlay, View3D::shading, Object::type, View3DShading::type, V3D_OVERLAY_EDIT_WEIGHT, V3D_SHADING_TEXTURE_COLOR, V3D_SHADING_VERTEX_COLOR, and CustomData_MeshMasks::vmask.
Referenced by ED_view3d_screen_datamask(), and screen_opengl_render_init().
| void ED_view3d_depth_override | ( | Depsgraph * | depsgraph, |
| ARegion * | region, | ||
| View3D * | v3d, | ||
| Object * | obact, | ||
| eV3DDepthOverrideMode | mode, | ||
| bool | use_overlay, | ||
| ViewDepths ** | r_depths ) |
Redraw the viewport depth buffer. Call ED_view3d_has_depth_buffer_updated if you want to check if the viewport already has depth buffer updated.
| use_overlay | When enabled and the v3d has overlays enabled, show overlays. A rule of thumb for this value is:
|
Definition at line 2501 of file view3d_draw.cc.
References DEG_get_evaluated_scene(), depsgraph, DRW_draw_depth_loop(), ED_view3d_depths_free(), ED_view3d_draw_setup_view(), flag, View3D::flag, View3D_Runtime::flag, View3D::flag2, G_MAIN, ARegion::regiondata, RegionView3D::rflag, RGN_TYPE_WINDOW, View3D::runtime, RV3D_ZOFFSET_DISABLED, SPACE_VIEW3D, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), V3D_DEPTH_ALL, V3D_DEPTH_GPENCIL_ONLY, V3D_DEPTH_NO_GPENCIL, V3D_DEPTH_OBJECT_ONLY, V3D_DEPTH_SELECTED_ONLY, V3D_HIDE_OVERLAYS, V3D_RUNTIME_DEPTHBUF_OVERRIDDEN, V3D_SELECT_OUTLINE, view3d_depths_create(), 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(), blender::ed::greasepencil::DrawingPlacement::cache_viewport_depths(), curve_draw_invoke(), blender::ed::curves::curves_draw_invoke(), depthdropper_depth_sample_pt(), ED_view3d_cursor3d_position(), navigate_pivot_get(), blender::ed::object::object_transform_axis_target_invoke(), paint_proj_stroke(), PE_set_view3d_data(), view3d_zoom_border_exec(), and viewcenter_pick_invoke().
| bool ED_view3d_depth_read_cached | ( | const ViewDepths * | vd, |
| const int | mval[2], | ||
| int | margin, | ||
| float * | r_depth ) |
Definition at line 1773 of file view3d_utils.cc.
References BLI_array_iter_spiral_square, BLI_assert, data, ViewDepths::depth_range, depth_read_test_fn(), ViewDepths::depths, ViewDepths::h, max_ii(), min_ii(), ViewDepths::w, x, and y.
Referenced by annotation_stroke_eraser_is_occluded(), annotation_stroke_newfrombuffer(), depth_segment_cb(), ED_view3d_depth_read_cached_normal(), blender::ed::greasepencil::DrawingPlacement::get_depth(), blender::ed::object::object_transform_axis_target_modal(), blender::ed::curves::stroke_elem_project(), and stroke_elem_project().
| bool ED_view3d_depth_read_cached_normal | ( | const ARegion * | region, |
| const ViewDepths * | depths, | ||
| const int | mval[2], | ||
| float | r_normal[3] ) |
Definition at line 1818 of file view3d_utils.cc.
References add_v3_v3(), cross, cross_v3_v3v3(), ViewDepths::depth_range, ED_view3d_depth_read_cached(), ED_view3d_depth_unproject_v3(), i, normalize_v3(), sub_v3_v3v3(), x, and y.
Referenced by blender::ed::curves::curve_draw_event_add_first(), curve_draw_event_add_first(), blender::ed::object::object_transform_axis_target_modal(), blender::ed::curves::stroke_elem_project(), and stroke_elem_project().
| bool ED_view3d_depth_read_cached_seg | ( | const ViewDepths * | vd, |
| const int | mval_sta[2], | ||
| const int | mval_end[2], | ||
| int | margin, | ||
| float * | r_depth ) |
Definition at line 1249 of file view3d_utils.cc.
References BLI_bitmap_draw_2d_line_v2v2i(), copy_v2_v2_int(), data, and depth_segment_cb().
Referenced by annotation_stroke_newfrombuffer().
| bool ED_view3d_depth_unproject_v3 | ( | const ARegion * | region, |
| const int | mval[2], | ||
| double | depth, | ||
| float | r_location_world[3] ) |
Definition at line 1872 of file view3d_utils.cc.
References ED_view3d_unproject_v3(), and float.
Referenced by annotation_stroke_eraser_is_occluded(), ED_view3d_depth_read_cached_normal(), blender::ed::object::object_transform_axis_target_modal(), blender::ed::greasepencil::DrawingPlacement::project_depth(), blender::ed::curves::stroke_elem_project(), and stroke_elem_project().
| void ED_view3d_depths_free | ( | ViewDepths * | depths | ) |
Definition at line 2595 of file view3d_draw.cc.
References ViewDepths::depths, and MEM_freeN().
Referenced by annotation_session_free(), blender::ed::curves::curve_draw_exit(), curve_draw_exit(), ED_view3d_depth_override(), blender::ed::object::object_transform_axis_target_free_data(), PE_data_free(), and blender::ed::greasepencil::DrawingPlacement::~DrawingPlacement().
A version of ED_view3d_dist_soft_range_get that only returns the minimum.
For perspective-views where setting dist near or below the near clip-plane is likely to cause the viewport content to be clipped out of the view.
Definition at line 152 of file view3d_utils.cc.
References View3D::clip_start, and View3D::grid.
Referenced by ED_view3d_dist_soft_range_get(), view3d_from_minmax(), and view3d_localview_init().
| blender::Bounds< float > ED_view3d_dist_soft_range_get | ( | const View3D * | v3d, |
| bool | use_persp_range ) |
Calculate a "soft" working range for RegionView3D::dist.
This is an approximate range to avoid extreme values being set where nothing is visible.
The range is calculated based on values the user may change so the range should be used as guidance for operators to follow.
| use_persp_range | Use an alternative range for perspective views. It's not a requirement that perspective views use this, however in practice it's often preferable for perspective views to calculate the minimum based on near-clipping, unlike orthographic views. |
Definition at line 157 of file view3d_utils.cc.
References View3D::clip_end, and ED_view3d_dist_soft_min_get().
Referenced by view3d_zoom_border_exec(), view_zoom_apply_step(), and viewzoom_apply_3d().
| void ED_view3d_distance_set | ( | RegionView3D * | rv3d, |
| float | dist ) |
Set the dist without moving the view (compensate with RegionView3D.ofs)
Definition at line 1393 of file view3d_utils.cc.
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], | ||
| 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 1413 of file view3d_utils.cc.
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_setup_view | ( | const wmWindowManager * | wm, |
| wmWindow * | win, | ||
| Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| ARegion * | region, | ||
| View3D * | v3d, | ||
| const float | viewmat[4][4], | ||
| const float | winmat[4][4], | ||
| const rcti * | rect ) |
Set the correct matrices
Definition at line 344 of file view3d_draw.cc.
References depsgraph, ARegion::regiondata, UNUSED_VARS, view3d_main_region_setup_view(), view3d_stereo3d_active(), and view3d_stereo3d_setup().
Referenced by ED_view3d_depth_override(), gizmo_find_intersected_3d_intern(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), view3d_draw_view(), and view3d_gpu_select_ex().
| RenderEngineType * ED_view3d_engine_type | ( | const Scene * | scene, |
| int | drawtype ) |
Definition at line 1660 of file view3d_draw.cc.
References RenderData::engine, RenderEngineType::flag, OB_MATERIAL, Scene::r, RE_engine_id_BLENDER_EEVEE, RE_engines_find(), and RE_USE_EEVEE_VIEWPORT.
Referenced by DRW_draw_view(), ED_view3d_draw_offscreen(), and blender::draw::overlay::Instance::init().
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 1607 of file view3d_utils.cc.
References BLI_assert, copy_m3_m4(), invert_qt_normalized(), madd_v3_v3fl(), mat3_normalized_to_quat(), negate_v3_v3(), and normalize_m3().
Referenced by ED_view3d_from_object(), and object_apply_mat4_with_protect().
| void ED_view3d_from_object | ( | const Object * | ob, |
| float | ofs[3], | ||
| float | quat[4], | ||
| const float * | dist, | ||
| float * | lens ) |
Set the RegionView3D members from an objects transformation and optionally lens.
| ob | The object to set the view to. |
| ofs | The view offset to be set, normally from RegionView3D.ofs. |
| quat | The view rotation to be set, quaternion normally from RegionView3D.viewquat. |
| dist | The view distance from ofs to be set, normally from RegionView3D.dist. |
| lens | The view lens angle set for cameras and lights, normally from View3D.lens. |
Definition at line 1643 of file view3d_utils.cc.
References BKE_camera_params_from_object(), BKE_camera_params_init(), ED_view3d_from_m4(), and params.
Referenced by axis_set_view(), ED_view3d_camera_lock_init_ex(), ED_view3d_persp_switch_from_camera(), and ED_view3d_smooth_view_ex().
mval comes from event->mval, only use within region handlers.
Definition at line 2493 of file view3d_select.cc.
References C, and ed_view3d_give_base_under_cursor_ex().
Referenced by datadropper_id_sample_pt(), ED_view3d_give_object_under_cursor(), and blender::ed::object::object_transfer_mode_invoke().
| Object * ED_view3d_give_material_slot_under_cursor | ( | bContext * | C, |
| const int | mval[2], | ||
| int * | r_material_slot ) |
Definition at line 2507 of file view3d_select.cc.
References C, ed_view3d_give_base_under_cursor_ex(), and Base::object.
Referenced by blender::ed::object::drop_named_material_invoke(), blender::ed::object::drop_named_material_tooltip(), and eyedropper_cryptomatte_sample_view3d_fl().
Definition at line 2498 of file view3d_select.cc.
References C, ED_view3d_give_base_under_cursor(), and Base::object.
Referenced by blender::ed::object::drop_geometry_nodes_invoke(), blender::ed::object::drop_geometry_nodes_tooltip(), ED_view3d_is_object_under_cursor(), blender::ed::object::object_image_add_invoke(), view3d_ima_empty_drop_poll(), and view3d_mat_drop_poll().
| void ED_view3d_gizmo_mesh_preselect_clear | ( | wmGizmo * | gz | ) |
Definition at line 550 of file view3d_gizmo_preselect_type.cc.
References ARRAY_SIZE, MeshEdgeRingGizmo3D::base_index, MeshElemGizmo3D::base_index, BLI_assert_unreachable, MeshEdgeRingGizmo3D::edge_index, MeshElemGizmo3D::edge_index, MeshElemGizmo3D::face_index, i, wmGizmoType::idname, wmGizmo::ptr, RNA_property_int_set(), RNA_struct_find_property(), STREQ, wmGizmo::type, and MeshElemGizmo3D::vert_index.
Referenced by gizmo_preselect_poll_for_draw().
| void ED_view3d_gizmo_mesh_preselect_get_active | ( | const bContext * | C, |
| const wmGizmo * | gz, | ||
| Base ** | r_base, | ||
| BMElem ** | r_ele ) |
Definition at line 500 of file view3d_gizmo_preselect_type.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_bases_in_edit_mode(), bm, BMEditMesh::bm, BM_edge_at_index_find(), BM_face_at_index_find(), BM_vert_at_index_find(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), Base::object, wmGizmo::ptr, RNA_int_get(), RNA_property_int_get(), RNA_struct_find_property(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by edbm_preselect_or_active().
Remove all rulers when Annotation layer is removed.
Definition at line 636 of file view3d_gizmo_ruler.cc.
References bScreen::areabase, BKE_area_find_region_type(), C, CTX_wm_manager(), ED_region_tag_redraw_editor_overlays(), Scene::gpd, gzgroup_ruler_item_first_get(), LISTBASE_FOREACH, RGN_TYPE_WINDOW, ruler_item_remove(), ARegion::runtime, SPACE_VIEW3D, view3d_gzgt_ruler_id, view3d_ruler_layer_get(), wmWindowManager::windows, WM_gizmomap_group_find(), WM_window_get_active_scene(), and WM_window_get_active_screen().
Referenced by gpencil_layer_remove_exec().
| void ED_view3d_global_to_vector | ( | const RegionView3D * | rv3d, |
| const float | coord[3], | ||
| float | r_out[3] ) |
Calculate a normalized 3D direction vector from the viewpoint towards a global location. In orthographic view the resulting vector will match the view vector.
| rv3d | The region (used for the window width and height). |
| coord | The world-space location. |
| r_out | The resulting normalized vector. |
Definition at line 423 of file view3d_project.cc.
References copy_v3_v3(), RegionView3D::is_persp, mul_m4_v4(), mul_v3_fl(), normalize_v3(), sub_v3_v3v3(), RegionView3D::viewinv, and RegionView3D::viewmat.
Referenced by add_vertex_invoke(), dial_ghostarc_get_angles(), blender::ed::transform::gizmo_get_idot(), blender::ed::sculpt_paint::project_brush_radius(), update_location_for_2d_curve(), and v3d_cursor_plane_draw().
Definition at line 860 of file view3d_draw.cc.
References ED_scene_grid_scale(), and View3D::grid.
Referenced by ED_view3d_grid_view_scale(), blender::ed::object::new_primitive_matrix(), blender::ed::object::object_camera_add_exec(), and WM_operator_view3d_unit_defaults().
| void ED_view3d_grid_steps | ( | const Scene * | scene, |
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| float | r_grid_steps[8] ) |
| float ED_view3d_grid_view_scale | ( | const Scene * | scene, |
| const View3D * | v3d, | ||
| const ARegion * | region, | ||
| const char ** | r_grid_unit ) |
Simulates the grid scale that is actually viewed. The actual code is seen in object_grid_frag.glsl (see grid_res). Currently the simulation is only done when RV3D_VIEW_IS_AXIS.
Definition at line 927 of file view3d_draw.cc.
References BKE_unit_display_name_get(), ED_view3d_grid_scale(), i, IFACE_, RegionView3D::is_persp, ARegion::regiondata, RV3D_VIEW_IS_AXIS, ARegion::sizex, STEPS_LEN, RegionView3D::view, view3d_grid_steps_ex(), and RegionView3D::winmat.
Referenced by draw_grid_unit_name(), blender::ed::greasepencil::grease_pencil_snap_to_grid_exec(), idp_snap_calc_incremental(), snap_curs_to_grid_exec(), blender::ed::transform::snap_object_context_runtime_init(), snap_sel_to_grid_exec(), and blender::ed::transform::transform_snap_grid_init().
| bool ED_view3d_has_depth_buffer_updated | ( | const Depsgraph * | depsgraph, |
| const View3D * | v3d ) |
Definition at line 2603 of file view3d_draw.cc.
References DEG_get_evaluated_scene(), depsgraph, RenderData::engine, RenderEngineType::flag, View3D::flag2, OB_MATERIAL, OB_RENDER, OB_SOLID, Scene::r, RE_engine_id_BLENDER_EEVEE, RE_engine_id_BLENDER_WORKBENCH, RE_engines_find(), RE_INTERNAL, View3D::shading, STREQ, View3DShading::type, UNUSED_VARS, V3D_HIDE_OVERLAYS, and XRAY_ENABLED.
Referenced by navigate_pivot_get().
| bool ED_view3d_has_workbench_in_texture_color | ( | const Scene * | scene, |
| const Object * | ob, | ||
| const View3D * | v3d ) |
Definition at line 122 of file view3d_utils.cc.
References BKE_scene_uses_blender_workbench(), View3DShading::color_type, Scene::display, Object::mode, OB_MODE_TEXTURE_PAINT, OB_RENDER, OB_SOLID, SceneDisplay::shading, View3D::shading, View3DShading::type, and V3D_SHADING_TEXTURE_COLOR.
Referenced by blender::ed::space_node::has_workbench_in_texture_color().
| void ED_view3d_init_mats_rv3d | ( | const Object * | ob, |
| RegionView3D * | rv3d ) |
Most of the time this isn't needed since you could assume the view matrix was set while drawing, however when functions like mesh_foreachScreenVert are called by selection tools, we can't be sure this object was the last.
for example, transparent objects are drawn after edit-mode and will cause the rv3d mat's to change and break selection.
'ED_view3d_init_mats_rv3d' should be called before view3d_project_short_clip and view3d_project_short_noclip in cases where these functions are not used during draw_object
Definition at line 122 of file space_view3d.cc.
References ED_view3d_clipping_local(), mul_m4_m4m4(), 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(), ED_curve_editfont_select_pick(), ED_curve_pick_vert_ex(), 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_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(), paintface_select_loop(), pose_circle_select(), blender::ed::sculpt_paint::stroke_test_start(), vpaint_stroke_update_step(), weight_sample_group_invoke(), weight_sample_invoke(), and wpaint_stroke_update_step().
| void ED_view3d_init_mats_rv3d_gl | ( | const Object * | ob, |
| RegionView3D * | rv3d ) |
Definition at line 132 of file space_view3d.cc.
References ED_view3d_init_mats_rv3d(), and GPU_matrix_mul.
| bool ED_view3d_is_object_under_cursor | ( | bContext * | C, |
| const int | mval[2] ) |
Definition at line 2518 of file view3d_select.cc.
References C, and ED_view3d_give_object_under_cursor().
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 496 of file view3d_utils.cc.
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 | ( | const bContext * | C, |
| bool | reset_all ) |
Definition at line 1289 of file view3d_view.cc.
References 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_uid, 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 1265 of file view3d_view.cc.
References View3D::flag, free_localcollection_bit(), View3D::local_collections_uid, reset(), V3D_LOCAL_COLLECTIONS, and view3d_local_collections_reset().
| bool ED_view3d_lock | ( | RegionView3D * | rv3d | ) |
Definition at line 1596 of file view3d_utils.cc.
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 | ( | View3D * | v3d | ) |
Definition at line 506 of file view3d_utils.cc.
References View3D::flag2, 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 1562 of file view3d_utils.cc.
References RV3D_VIEW_FRONT, RV3D_VIEW_RIGHT, RV3D_VIEW_TOP, and RV3D_VIEW_USER.
Referenced by ED_view3d_quadview_update(), and region_quadview_exec().
| RV3DMatrixStore * ED_view3d_mats_rv3d_backup | ( | RegionView3D * | rv3d | ) |
Definition at line 2721 of file view3d_draw.cc.
References copy_m4_m4(), copy_v4_v4(), MEM_mallocN(), RegionView3D::persinv, RV3DMatrixStore::persinv, RegionView3D::persmat, RV3DMatrixStore::persmat, RegionView3D::pixsize, RV3DMatrixStore::pixsize, RegionView3D::viewcamtexcofac, RV3DMatrixStore::viewcamtexcofac, RegionView3D::viewinv, RV3DMatrixStore::viewinv, RegionView3D::viewmat, RV3DMatrixStore::viewmat, RegionView3D::winmat, and RV3DMatrixStore::winmat.
Referenced by ED_view3d_draw_offscreen(), and blender::ed::greasepencil::image_render::region_init().
| void ED_view3D_mats_rv3d_free | ( | RV3DMatrixStore * | rv3d_mat | ) |
Definition at line 2747 of file view3d_draw.cc.
References MEM_freeN().
Referenced by blender::ed::greasepencil::image_render::region_reset().
| void ED_view3d_mats_rv3d_restore | ( | RegionView3D * | rv3d, |
| RV3DMatrixStore * | rv3dmat ) |
Definition at line 2735 of file view3d_draw.cc.
References copy_m4_m4(), copy_v4_v4(), RegionView3D::persinv, RV3DMatrixStore::persinv, RegionView3D::persmat, RV3DMatrixStore::persmat, RegionView3D::pixsize, RV3DMatrixStore::pixsize, RegionView3D::viewcamtexcofac, RV3DMatrixStore::viewcamtexcofac, RegionView3D::viewinv, RV3DMatrixStore::viewinv, RegionView3D::viewmat, RV3DMatrixStore::viewmat, RegionView3D::winmat, and RV3DMatrixStore::winmat.
Referenced by ED_view3d_draw_offscreen(), and blender::ed::greasepencil::image_render::region_reset().
| bool ED_view3d_navigation_do | ( | bContext * | C, |
| ViewOpsData * | vod, | ||
| const wmEvent * | event, | ||
| const float | depth_loc_override[3] ) |
Definition at line 1120 of file view3d_navigate.cc.
References ViewOpsType::apply_fn, C, ViewOpsData::depsgraph, ED_view3d_update_viewmat(), ViewOpsData::end_navigation(), EVT_MODAL_MAP, ViewOpsData_Utility::is_modal_event, ViewOpsData_Utility::keymap_items, LISTBASE_FOREACH, ViewOpsData::nav_type, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, ViewOpsType::poll_fn, ViewOpsData::region, RegionView3D::rflag, ViewOpsData::rv3d, RV3D_NAVIGATING, ViewOpsData::scene, wmEvent::type, ViewOpsData::v3d, wmEvent::val, view3d_navigate_event(), view3d_navigation_invoke_generic(), view3d_navigation_type_from_idname(), WM_event_match(), and wmEvent::xy.
Referenced by blender::ed::greasepencil::grease_pencil_primitive_modal(), and blender::ed::transform::transform_modal().
| void ED_view3d_navigation_free | ( | bContext * | C, |
| ViewOpsData * | vod ) |
Definition at line 1193 of file view3d_navigate.cc.
References C, and ViewOpsData::end_navigation().
Referenced by blender::ed::greasepencil::grease_pencil_primitive_exit(), and blender::ed::transform::postTrans().
| ViewOpsData * ED_view3d_navigation_init | ( | bContext * | C, |
| const wmKeyMapItem * | kmi_merge ) |
Utilities to perform navigation. Call ED_view3d_navigation_init to create a context and ED_view3d_navigation_do to perform navigation in modal operators.
Definition at line 1109 of file view3d_navigate.cc.
References C, and CTX_wm_region_view3d().
Referenced by blender::ed::greasepencil::grease_pencil_primitive_invoke(), and blender::ed::transform::initTransInfo().
| blender::float4x4 ED_view3d_ob_project_mat_get | ( | const RegionView3D * | rv3d, |
| const Object * | ob ) |
Definition at line 760 of file view3d_project.cc.
References mul_m4_m4m4(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), RegionView3D::viewmat, and RegionView3D::winmat.
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), content_planes_from_clip_flag(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), ed_curves_select_pick(), edbm_rip_edge_invoke(), edbm_rip_invoke__edge(), edbm_rip_invoke__vert(), blender::ed::curves::find_closest_curve(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::greasepencil::grease_pencil_primitive_modal(), blender::ed::sculpt_paint::gesture::init_from_lasso(), blender::ed::curves::pen_tool::PenToolOperation::invoke(), knifeproject_poly_from_object(), obedit_circle_select(), paint_convert_bb_to_rect(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), pointcloud_select_pick(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::ed::sculpt_paint::vwpaint::update_cache_invariants(), blender::ed::transform::EdgeSlideData::update_proj_mat(), blender::ed::transform::VertSlideData::update_proj_mat(), view3d_box_select_exec(), and view3d_lasso_select().
| blender::float4x4 ED_view3d_ob_project_mat_get_from_obmat | ( | const RegionView3D * | rv3d, |
| const blender::float4x4 & | obmat ) |
Definition at line 770 of file view3d_project.cc.
References RegionView3D::viewmat, and RegionView3D::winmat.
Referenced by blender::ed::greasepencil::build_curves_2d_bvh_from_visible(), do_grease_pencil_box_select(), do_lasso_select_grease_pencil(), ed_grease_pencil_select_pick(), grease_pencil_circle_select(), proj_paint_state_viewport_init(), blender::ed::greasepencil::stroke_trim_execute(), and blender::ed::greasepencil::weight_sample_invoke().
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 1372 of file view3d_utils.cc.
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 View3D * | v3d, |
| const RegionView3D * | rv3d ) |
Definition at line 491 of file view3d_utils.cc.
References View3D::ob_center, View3D::ob_center_cursor, RegionView3D::persp, and RV3D_CAMOB.
Referenced by initFlyInfo(), initWalkInfo(), ViewOpsData::state_restore(), view3d_lock_poll(), viewdolly_offset_lock_check(), and viewmove_apply().
Action to take when rotating the view, handle auto-perspective and logic for switching out of views.
shared with NDOF.
Definition at line 535 of file view3d_utils.cc.
References BLI_assert, depsgraph, ED_view3d_camera_lock_check(), ED_view3d_persp_switch_from_camera(), RegionView3D::lpersp, RegionView3D::lview, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_LOCK_ANY_TRANSFORM, RV3D_LOCK_FLAGS, RV3D_PERSP, RV3D_VIEW_IS_AXIS, U, USER_AUTOPERSP, and RegionView3D::view.
Referenced by ViewOpsData::init_navigation().
| void ED_view3d_persp_switch_from_camera | ( | const Depsgraph * | depsgraph, |
| View3D * | v3d, | ||
| RegionView3D * | rv3d, | ||
| char | persp ) |
For viewport operators that exit camera perspective.
Definition at line 515 of file view3d_utils.cc.
References BLI_assert, View3D::camera, DEG_get_evaluated(), depsgraph, RegionView3D::dist, ED_view3d_camera_lock_check(), ED_view3d_from_object(), ED_view3d_offset_distance(), NC_SPACE, ND_SPACE_VIEW3D, RegionView3D::ofs, RegionView3D::persp, RV3D_CAMOB, VIEW3D_DIST_FALLBACK, RegionView3D::viewquat, and WM_main_add_notifier().
Referenced by ED_view3d_persp_ensure(), view3d_zoom_border_exec(), and viewdolly_invoke().
| float ED_view3d_pixel_size | ( | const RegionView3D * | rv3d, |
| const float | co[3] ) |
Definition at line 278 of file view3d_project.cc.
References mul_project_m4_v3_zfac(), RegionView3D::persmat, RegionView3D::pixsize, and U.
Referenced by blender::ed::sculpt_paint::greasepencil::brush_radius_to_pixel_radius(), cage3d_draw_box_interaction(), cage3d_draw_circle_handles(), blender::ed::sculpt_paint::greasepencil::calculate_view_radii(), blender::ed::transform::drawSnapping(), ED_view3d_cursor_snap_draw_util(), edbm_bevel_invoke(), edbm_inset_invoke(), blender::ed::greasepencil::get_boundary_bounds(), blender::ed::sculpt_paint::grease_pencil_fill_modal(), v3d_cursor_plane_draw(), and blender::ed::transform::WIDGETGROUP_gizmo_draw_prepare().
| float ED_view3d_pixel_size_no_ui_scale | ( | const RegionView3D * | rv3d, |
| const float | co[3] ) |
Definition at line 283 of file view3d_project.cc.
References mul_project_m4_v3_zfac(), RegionView3D::persmat, and RegionView3D::pixsize.
Referenced by blender::draw::overlay::Cursor::begin_sync(), dial_draw_intern(), gizmo_button2d_bounds(), gizmo_ruler_draw(), knifetool_draw_angle(), blender::ed::object::voxel_size_edit_invoke(), and wm_gizmo_calculate_scale().
| void ED_view3d_polygon_offset | ( | const RegionView3D * | rv3d, |
| float | dist ) |
Use instead of: GPU_polygon_offset(rv3d->dist, ...) see bug #37727.
Definition at line 253 of file view3d_utils.cc.
References RegionView3D::dist, fabsf, GPU_polygon_offset(), RegionView3D::is_persp, max_ff(), RegionView3D::persp, RegionView3D::rflag, RV3D_CAMOB, RV3D_ZOFFSET_DISABLED, and RegionView3D::winmat.
| eV3DProjStatus ED_view3d_project_base | ( | const ARegion * | region, |
| Base * | base, | ||
| float | r_co[2] ) |
Definition at line 82 of file view3d_project.cc.
References ED_view3d_project_float_global(), Base::object, ret, 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 ARegion * | region, |
| float | perspmat[4][4], | ||
| bool | is_local, | ||
| const float | co[3], | ||
| float | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 201 of file view3d_project.cc.
References copy_v2_v2(), ed_view3d_project__internal(), flag, ret, V3D_PROJ_RET_OK, and V3D_PROJ_RET_OVERFLOW.
Referenced by ED_view3d_project_float_global(), and ED_view3d_project_float_object().
| eV3DProjStatus ED_view3d_project_float_global | ( | const ARegion * | region, |
| const float | co[3], | ||
| float | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 257 of file view3d_project.cc.
References ED_view3d_project_float_ex(), flag, RegionView3D::persmat, and ARegion::regiondata.
Referenced by annotation_stroke_convertcoords(), blender::ed::transform::applyFaceProject(), blender::ed::transform::ApplySnapTranslation(), blender::ed::sculpt_paint::greasepencil::calculate_view_positions(), blender::ed::transform::calculateCenterCursor(), ED_view3d_cursor3d_update(), ED_view3d_project_base(), blender::ed::greasepencil::get_boundary_bounds(), gizmo_button2d_bounds(), gizmo_ruler_draw(), gizmo_ruler_invoke(), blender::ed::greasepencil::grease_pencil_reproject_exec(), knife_project_v2(), knifetool_draw_visible_angles(), mouse_select_object_center(), object_circle_select(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::project_brush_radius(), blender::io::grease_pencil::GreasePencilExporter::project_to_screen(), blender::ed::transform::projectFloatViewEx(), blender::ed::greasepencil::DrawingPlacement::reproject(), blender::ed::transform::updateSelectedSnapPoint(), and view3d_ruler_pick().
| eV3DProjStatus ED_view3d_project_float_object | ( | const ARegion * | region, |
| const float | co[3], | ||
| float | r_co[2], | ||
| eV3DProjTest | flag ) |
Object space, use ED_view3d_init_mats_rv3d before calling.
Definition at line 265 of file view3d_project.cc.
References ED_view3d_check_mats_rv3d(), ED_view3d_project_float_ex(), flag, RegionView3D::persmatob, and ARegion::regiondata.
Referenced by ED_curve_editfont_select_pick(), ed_mesh_pick_face_vert__mpoly_find(), ed_mesh_pick_vert__mapFunc(), edbm_dupli_extrude_cursor_invoke(), EDBM_project_snap_verts(), gradientVertInit__mapFunc(), lattice_foreachScreenVert(), mball_foreachScreenElem(), mesh_foreachScreenFace__mapFunc(), mesh_foreachScreenVert__mapFunc(), meshobject_foreachScreenVert__mapFunc(), mouse_mesh_loop(), nurbs_foreachScreenVert(), paint_and_tex_color_alpha_intern(), view3d_project_segment_to_screen_with_clip_tag(), view3d_project_segment_to_screen_with_content_clip_planes(), vpaint_proj_dm_map_cosnos_update__map_cb(), and worldspace_to_screenspace().
| blender::float2 ED_view3d_project_float_v2_m4 | ( | const ARegion * | region, |
| const float | co[3], | ||
| const blender::float4x4 & | mat ) |
Definition at line 33 of file view3d_project.cc.
References copy_v3_v3(), float, mul_m4_v4(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), vec4(), ARegion::winx, ARegion::winy, and zero_v2().
Referenced by blender::ed::greasepencil::build_curves_2d_bvh_from_visible(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), edbm_rip_edge_invoke(), edbm_rip_edge_side_measure(), edbm_rip_edgedist_squared(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::gesture::is_affected_lasso(), blender::ed::curves::pen_tool::PenToolOperation::layer_to_screen(), paint_convert_bb_to_rect(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::greasepencil::primitive_local_to_screen(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), sculpt_apply_texture(), blender::ed::pointcloud::select_box(), blender::ed::curves::select_box_mask(), blender::ed::pointcloud::select_circle(), blender::ed::curves::select_circle_mask(), blender::ed::pointcloud::select_lasso(), blender::ed::curves::select_lasso_mask(), and blender::ed::sculpt_paint::vertex_is_occluded().
| void ED_view3d_project_float_v3_m4 | ( | const ARegion * | region, |
| const float | co[3], | ||
| float | r_co[3], | ||
| const float | mat[4][4] ) |
Definition at line 56 of file view3d_project.cc.
References copy_v3_v3(), float, mul_m4_v4(), vec4(), ARegion::winx, ARegion::winy, and zero_v3().
| eV3DProjStatus ED_view3d_project_int_ex | ( | const ARegion * | region, |
| float | perspmat[4][4], | ||
| bool | is_local, | ||
| const float | co[3], | ||
| int | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 178 of file view3d_project.cc.
References ed_view3d_project__internal(), flag, floorf, ret, V3D_PROJ_RET_OK, and V3D_PROJ_RET_OVERFLOW.
Referenced by ED_view3d_project_int_global(), and ED_view3d_project_int_object().
| eV3DProjStatus ED_view3d_project_int_global | ( | const ARegion * | region, |
| const float | co[3], | ||
| int | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 239 of file view3d_project.cc.
References ED_view3d_project_int_ex(), flag, RegionView3D::persmat, and ARegion::regiondata.
Referenced by blender::draw::overlay::Cursor::begin_sync(), brush_cut(), gpencil_point_to_xy(), key_inside_circle(), key_inside_rect(), key_test_depth(), PE_lasso_select(), and blender::ed::transform::projectIntViewEx().
| eV3DProjStatus ED_view3d_project_int_object | ( | const ARegion * | region, |
| const float | co[3], | ||
| int | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 247 of file view3d_project.cc.
References ED_view3d_check_mats_rv3d(), ED_view3d_project_int_ex(), flag, RegionView3D::persmatob, and ARegion::regiondata.
| eV3DProjStatus ED_view3d_project_short_ex | ( | const ARegion * | region, |
| float | perspmat[4][4], | ||
| bool | is_local, | ||
| const float | co[3], | ||
| short | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 156 of file view3d_project.cc.
References ed_view3d_project__internal(), flag, floorf, ret, V3D_PROJ_RET_OK, and V3D_PROJ_RET_OVERFLOW.
Referenced by DRW_text_cache_draw(), ED_view3d_project_short_global(), and ED_view3d_project_short_object().
| eV3DProjStatus ED_view3d_project_short_global | ( | const ARegion * | region, |
| const float | co[3], | ||
| short | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 221 of file view3d_project.cc.
References ED_view3d_project_short_ex(), flag, RegionView3D::persmat, and ARegion::regiondata.
| eV3DProjStatus ED_view3d_project_short_object | ( | const ARegion * | region, |
| const float | co[3], | ||
| short | r_co[2], | ||
| eV3DProjTest | flag ) |
Definition at line 229 of file view3d_project.cc.
References ED_view3d_check_mats_rv3d(), ED_view3d_project_short_ex(), flag, RegionView3D::persmatob, and ARegion::regiondata.
Definition at line 784 of file view3d_project.cc.
References GPU_matrix_project_2fv(), ARegion::regiondata, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winx, and ARegion::winy.
Referenced by blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), gizmo_preselect_elem_test_select(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::paint_space_stroke(), and blender::ed::object::voxel_size_edit_invoke().
Convert between region relative coordinates (x,y) and depth component z and a point in world space.
Definition at line 776 of file view3d_project.cc.
References GPU_matrix_project_3fv(), ARegion::regiondata, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winx, and ARegion::winy.
Referenced by blender::ed::sculpt_paint::cursor_draw_point_screen_space(), key_test_depth(), and blender::ed::object::object_transform_axis_target_calc_depth_init().
'clip' is used to know if our clip setting has changed.
Definition at line 1012 of file view3d_utils.cc.
References ARegion::alignment, ED_area_tag_redraw(), ED_view3d_lock(), ED_view3d_lock_view_from_index(), ListBase::last, LISTBASE_FOREACH, RegionView3D::persp, ARegion::prev, ScrArea::regionbase, 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 | ( | char | view, |
| char | view_axis_roll, | ||
| float | r_quat[4] ) |
Definition at line 1488 of file view3d_utils.cc.
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(), ED_view3d_quat_to_axis_view_and_reset_quat(), view3d_boxview_sync_axis(), view_axis_exec(), and vieworbit_exec().
| bool ED_view3d_quat_to_axis_view | ( | const float | quat[4], |
| float | epsilon, | ||
| char * | r_view, | ||
| char * | r_view_axis_roll ) |
Definition at line 1498 of file view3d_utils.cc.
References angle_signed_qtqt(), fabsf, FLT_MAX, M_PI_4, 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 ED_view3d_quat_to_axis_view_and_reset_quat().
| bool ED_view3d_quat_to_axis_view_and_reset_quat | ( | float | quat[4], |
| float | epsilon, | ||
| char * | r_view, | ||
| char * | r_view_axis_roll ) |
A version of ED_view3d_quat_to_axis_view that updates quat if it's within epsilon to an axis-view.
Definition at line 1548 of file view3d_utils.cc.
References BLI_assert, ED_view3d_quat_from_axis_view(), ED_view3d_quat_to_axis_view(), and RV3D_VIEW_USER.
Referenced by view_roll_angle(), and viewrotate_apply_snap().
| float ED_view3d_radius_to_dist | ( | const View3D * | v3d, |
| const ARegion * | region, | ||
| const Depsgraph * | depsgraph, | ||
| char | persp, | ||
| bool | use_aspect, | ||
| float | radius ) |
Return a new RegionView3D.dist value to fit the radius.
+
pt --> + /^ radius
/ |
/ |
view + +
\ |
\ |
|
+
| region | Can be NULL if use_aspect is false. |
| persp | Allow the caller to tell what kind of perspective to use (ortho/view/camera) |
| use_aspect | Increase the distance to account for non 1:1 view aspect. |
| radius | The radius will be fitted exactly, typically pre-scaled by a margin (VIEW3D_MARGIN). |
Definition at line 1292 of file view3d_utils.cc.
References angle(), atanf, BKE_camera_params_from_object(), BKE_camera_params_init(), BKE_camera_sensor_size(), BLI_assert, View3D::camera, CAMERA_PARAM_ZOOM_INIT_CAMOB, CAMERA_PARAM_ZOOM_INIT_PERSP, View3D::clip_end, View3D::clip_start, DEFAULT_SENSOR_WIDTH, DEG_get_evaluated(), depsgraph, ED_view3d_radius_to_dist_ortho(), ED_view3d_radius_to_dist_persp(), ELEM, focallength_to_fov(), View3D::lens, params, ARegion::regiondata, RV3D_CAMOB, RV3D_ORTHO, RV3D_PERSP, tanf, RegionView3D::viewcamtexcofac, ARegion::winx, and ARegion::winy.
Referenced by view3d_from_minmax(), and view3d_localview_init().
Definition at line 1287 of file view3d_utils.cc.
References DEFAULT_SENSOR_WIDTH.
Referenced by ED_view3d_radius_to_dist().
Definition at line 1282 of file view3d_utils.cc.
Referenced by ED_view3d_radius_to_dist().
| void ED_view3d_screen_datamask | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| const bScreen * | screen, | ||
| CustomData_MeshMasks * | r_cddata_masks ) |
Goes over all modes and view3d settings.
Definition at line 2682 of file view3d_draw.cc.
References bScreen::areabase, CD_MASK_BAREMESH, CustomData_MeshMasks_update(), ED_view3d_datamask(), LISTBASE_FOREACH, and SPACE_VIEW3D.
Referenced by wm_event_do_depsgraph().
| float ED_view3d_select_dist_px | ( | ) |
Definition at line 115 of file view3d_select.cc.
References U.
Referenced by blender::ed::curves::closest_elem_find_screen_space(), curve_pen_invoke(), curve_pen_modal(), ED_curve_editfont_select_pick(), ED_curve_pick_vert(), edbm_elem_find_nearest(), findnearestLattvert(), get_closest_vertex_to_point_in_nurbs(), gizmo_preselect_edgering_test_select(), gizmo_preselect_elem_test_select(), insert_point_to_segment(), blender::ed::curves::pen_tool::PenToolOperation::invoke(), loopcut_mouse_move(), mouse_select_object_center(), pe_deflect_emitter(), pe_nearest_point_and_key(), pointcloud_select_pick(), unified_findnearest(), and view3d_select_exec().
| eV3DSelectObjectFilter ED_view3d_select_filter_from_mode | ( | const Scene * | scene, |
| const Object * | obact ) |
Definition at line 520 of file view3d_view.cc.
References BKE_object_pose_armature_get(), Object::mode, OB_MODE_ALL_WEIGHT_PAINT, ToolSettings::object_flag, SCE_OBJECT_MODE_LOCK, Scene::toolsettings, VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK, and VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK.
Referenced by do_object_box_select(), do_pose_box_select(), and ed_object_select_pick().
| void ED_view3d_select_id_validate | ( | const ViewContext * | vc | ) |
Definition at line 2384 of file view3d_draw.cc.
References ViewContext::depsgraph, ViewContext::obact, ViewContext::region, ViewContext::scene, ViewContext::v3d, validate_object_select_id(), and ViewContext::view_layer.
Referenced by ED_mesh_pick_edge(), ED_mesh_pick_face(), ED_mesh_pick_vert(), and paintface_select_loop().
Definition at line 178 of file space_view3d.cc.
References ED_view3d_stop_render_preview(), ListBase::first, LISTBASE_FOREACH, OB_RENDER, ScrArea::regionbase, RGN_TYPE_WINDOW, View3D::shading, View3DShading::type, and Main::wm.
Referenced by toggle_matcap_flip_exec(), and toggle_shading_exec().
| bool ED_view3d_snap_selected_to_location | ( | bContext * | C, |
| wmOperator * | op, | ||
| const float | target_loc_global[3], | ||
| int | pivot_point ) |
Definition at line 699 of file view3d_snap.cc.
References C, and snap_selected_to_location_rotation().
Referenced by blender::ed::object::object_transform_to_mouse_exec().
| void ED_view3d_stop_render_preview | ( | wmWindowManager * | wm, |
| ARegion * | region ) |
Definition at line 156 of file space_view3d.cc.
References BPy_BEGIN_ALLOW_THREADS, BPy_END_ALLOW_THREADS, DRW_engine_external_free(), ARegion::regiondata, RegionView3D::view_render, 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().
| void ED_view3d_text_colors_get | ( | const Scene * | scene, |
| const View3D * | v3d, | ||
| float | r_text_color[4], | ||
| float | r_shadow_color[4] ) |
Definition at line 86 of file view3d_utils.cc.
References clamp_v3(), copy_v3_fl(), distance(), ED_view3d_background_color_get(), len_v3v3(), mul_v3_fl(), srgb_to_grayscale(), TH_TEXT_HI, and UI_GetThemeColor3fv().
Referenced by blender::ed::transform::drawAutoKeyWarning(), blender::ed::transform::transform_draw_cursor_draw(), and view3d_draw_region_info().
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 1633 of file view3d_utils.cc.
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 Depsgraph * | depsgraph, |
| Object * | ob, | ||
| const float | ofs[3], | ||
| const float | quat[4], | ||
| float | dist ) |
Set the object transformation from RegionView3D members.
| depsgraph | The depsgraph to get the evaluated object parent for the transformation calculation. |
| ob | The object which has the transformation assigned. |
| 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 1657 of file view3d_utils.cc.
References BKE_object_apply_mat4_ex(), DEG_get_evaluated(), depsgraph, ED_view3d_to_m4(), Object::parent, and Object::parentinv.
Referenced by ED_view3d_camera_lock_sync(), and view3d_camera_to_view_exec().
| bool ED_view3d_unproject_v3 | ( | const ARegion * | region, |
| float | regionx, | ||
| float | regiony, | ||
| float | regionz, | ||
| float | world[3] ) |
Definition at line 792 of file view3d_project.cc.
References GPU_matrix_unproject_3fv(), ARegion::regiondata, RegionView3D::viewinv, RegionView3D::winmat, ARegion::winx, and ARegion::winy.
Referenced by ED_view3d_autodist(), ED_view3d_autodist_simple(), ED_view3d_clipping_calc(), ED_view3d_depth_unproject_v3(), blender::ed::greasepencil::DrawingPlacement::place(), point_is_visible(), and view3d_zoom_border_exec().
| void ED_view3d_update_viewmat | ( | const Depsgraph * | depsgraph, |
| const Scene * | scene, | ||
| View3D * | v3d, | ||
| ARegion * | region, | ||
| const float | viewmat[4][4], | ||
| const float | winmat[4][4], | ||
| const rcti * | rect, | ||
| bool | offscreen ) |
Definition at line 99 of file view3d_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), View3D::camera, copy_m4_m4(), depsgraph, ED_view3d_calc_camera_border(), float, invert_m4_m4(), len_squared_v3(), max_ii(), min_ff(), mul_m4_m4m4(), RegionView3D::persinv, RegionView3D::persmat, RegionView3D::persp, RegionView3D::pixsize, ARegion::regiondata, RV3D_CAMOB, sqrtf, v2, view3d_viewmatrix_set(), view3d_winmatrix_set(), RegionView3D::viewcamtexcofac, RegionView3D::viewinv, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winx, ARegion::winy, rctf::xmin, and rctf::ymin.
Referenced by blender::ed::greasepencil::image_render::compute_view_matrices(), ED_view3d_navigation_do(), view3d_main_region_setup_offscreen(), view3d_main_region_setup_view(), and view3d_smooth_view_force_finish_ex().
| ViewContext ED_view3d_viewcontext_init | ( | bContext * | C, |
| Depsgraph * | depsgraph ) |
Definition at line 120 of file view3d_select.cc.
References ViewContext::bmain, C, ViewContext::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(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::curves::curve_draw_init(), curve_draw_init(), curve_pen_invoke(), curve_pen_modal(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), 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_curves_select_pick(), ed_grease_pencil_select_pick(), ED_lattice_deselect_all_multi(), ED_lattice_select_pick(), ED_mball_deselect_all_multi(), ed_mball_findnearest_metaelem(), ED_mesh_pick_edge(), ED_mesh_pick_face(), ED_mesh_pick_vert(), ed_object_select_pick(), ED_pose_deselect_all_multi(), ed_view3d_give_base_under_cursor_ex(), EDBM_mesh_deselect_all_multi(), EDBM_selectmode_disable_multi(), edcu_shortest_path_pick_invoke(), em_setup_viewcontext(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::sculpt_paint::gesture::init_common(), blender::ed::curves::pen_tool::PenToolOperation::invoke(), blender::ed::object::object_transform_axis_target_invoke(), blender::ed::sculpt_paint::paint_cursor_context_init(), paint_sample_color(), blender::ed::sculpt_paint::paint_stroke_new(), paintface_select_loop(), PE_set_view3d_data(), pointcloud_select_pick(), blender::ed::sculpt_paint::dyntopo::sample_detail(), blender::ed::greasepencil::select_ends_exec(), blender::ed::greasepencil::select_less_exec(), blender::ed::curves::select_linked_pick(), select_linked_pick_invoke(), blender::ed::greasepencil::select_more_exec(), blender::ed::greasepencil::select_random_exec(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), blender::ed::sculpt_paint::image::ops::paint::texture_paint_init(), blender::ed::sculpt_paint::update_modal_transform(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), view3d_select_exec(), vpaint_init_vpaint(), weight_sample_group_invoke(), blender::ed::greasepencil::weight_sample_invoke(), weight_sample_invoke(), and wpaint_stroke_test_start().
| void ED_view3d_viewcontext_init_object | ( | ViewContext * | vc, |
| Object * | obact ) |
Re-initialize vc with obact as if it's active object (with some differences).
This is often used when operating on multiple objects in modes (edit, pose mode etc) where the vc is passed in as an argument which then references its object data.
Definition at line 138 of file view3d_select.cc.
References BKE_editmesh_from_object(), BKE_object_is_in_editmode(), BLI_assert, ViewContext::em, ViewContext::obact, and ViewContext::obedit.
Referenced by do_lasso_select_pose(), ED_curve_pick_vert_ex(), ED_lattice_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(), knifeproject_exec(), loopcut_init(), loopcut_mouse_move(), mouse_mesh_loop(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_circle_select_recalc(), and view3d_lasso_select().
| bool ED_view3d_viewplane_get | ( | const Depsgraph * | depsgraph, |
| const View3D * | v3d, | ||
| const RegionView3D * | rv3d, | ||
| int | winx, | ||
| int | winy, | ||
| rctf * | r_viewplane, | ||
| float * | r_clip_start, | ||
| float * | r_clip_end, | ||
| float * | r_pixsize ) |
Definition at line 193 of file view3d_utils.cc.
References BKE_camera_params_compute_viewplane(), BKE_camera_params_from_view3d(), BKE_camera_params_init(), depsgraph, and params.
Referenced by blender::ed::greasepencil::image_render::compute_view_matrices(), ED_view3d_draw_offscreen_imbuf(), and view3d_winmatrix_set().
| void ED_view3d_win_to_3d | ( | const View3D * | v3d, |
| const ARegion * | region, | ||
| const float | depth_pt[3], | ||
| const float | mval[2], | ||
| float | r_out[3] ) |
Calculate a 3D location from 2D window coordinates.
| region | The region (used for the window width and height). |
| depth_pt | The reference location used to calculate the Z depth. |
| mval | The area relative location (such as event->mval converted to floats). |
| r_out | The resulting world-space location. |
Definition at line 481 of file view3d_project.cc.
References BKE_camera_sensor_fit(), BKE_screen_view3d_zoom_to_fac(), RegionView3D::camdx, RegionView3D::camdy, View3D::camera, CAMERA_SENSOR_FIT_HOR, RegionView3D::camzoom, copy_v3_v3(), Object::data, ED_view3d_win_to_vector(), fabsf, float, RegionView3D::is_persp, isect_ray_plane_v3_factor(), madd_v3_v3v3fl(), RegionView3D::persinv, RegionView3D::persp, ray_point_factor_v3(), ARegion::regiondata, RV3D_CAMOB, Camera::sensor_fit, Camera::shiftx, Camera::shifty, RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by armature_click_extrude_invoke(), blender::ed::sculpt_paint::brush_delta_update(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), curve_draw_invoke(), blender::ed::curves::curves_draw_invoke(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), depthdropper_depth_sample_pt(), ED_view3d_win_to_3d_int(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::sculpt_paint::trim::generate_geometry(), gizmo_window_project_3d(), ViewOpsData::init_navigation(), blender::ed::transform::initBend(), blender::ed::sculpt_paint::gesture::line_calculate_plane_points(), mesh_bisect_interactive_calc(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical_with_symmetry(), blender::ed::greasepencil::DrawingPlacement::project(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::curves::pen_tool::PenToolOperation::screen_to_layer(), screenspace_to_worldspace(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry(), blender::ed::curves::stroke_elem_project_fallback(), stroke_elem_project_fallback(), and v3d_cursor_snap_update().
| void ED_view3d_win_to_3d_int | ( | const View3D * | v3d, |
| const ARegion * | region, | ||
| const float | depth_pt[3], | ||
| const int | mval[2], | ||
| float | r_out[3] ) |
Definition at line 587 of file view3d_project.cc.
References ED_view3d_win_to_3d(), and float.
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(), extrude_points_from_selected_vertices(), gizmo_mesh_spin_redo_setup(), navigate_pivot_get(), 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 | ( | const ARegion * | region, |
| const float | plane[4], | ||
| const float | mval[2], | ||
| bool | do_clip, | ||
| float | r_out[3] ) |
Definition at line 597 of file view3d_project.cc.
References dot_m4_v3_row_z(), ED_view3d_win_to_origin(), ED_view3d_win_to_vector(), fabsf, RegionView3D::is_persp, isect_ray_plane_v3(), madd_v3_v3v3fl(), RegionView3D::persmat, RegionView3D::persp, ARegion::regiondata, and RV3D_CAMOB.
Referenced by calc_initial_placement_point_from_view(), dial_ghostarc_get_angles(), ED_view3d_win_to_3d_on_plane_int(), ED_view3d_win_to_3d_on_plane_with_fallback(), font_cursor_text_index_from_event(), blender::ed::sculpt_paint::trim::generate_geometry(), blender::ed::transform::gizmo_3d_dial_matrixbasis_calc(), gizmo_window_project_2d(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::ed::greasepencil::DrawingPlacement::project(), blender::ed::greasepencil::DrawingPlacement::project_with_shift(), blender::ed::curves::stroke_elem_project(), stroke_elem_project(), v3d_cursor_snap_update(), and view3d_win_to_3d_on_plane_maybe_fallback().
| bool ED_view3d_win_to_3d_on_plane_int | ( | const ARegion * | region, |
| const float | plane[4], | ||
| const int | mval[2], | ||
| bool | do_clip, | ||
| float | r_out[3] ) |
Definition at line 629 of file view3d_project.cc.
References ED_view3d_win_to_3d_on_plane(), and float.
Referenced by gizmo_mesh_spin_redo_setup().
| bool ED_view3d_win_to_3d_on_plane_with_fallback | ( | const ARegion * | region, |
| const float | plane[4], | ||
| const float | mval[2], | ||
| bool | do_clip, | ||
| const float | plane_fallback[4], | ||
| float | r_out[3] ) |
A wrapper for ED_view3d_win_to_3d_on_plane that projects onto plane_fallback then maps this back to plane.
This is intended to be used when plane is orthogonal to the views Z axis where projecting the mval doesn't work well (or fail completely when exactly aligned).
Definition at line 639 of file view3d_project.cc.
References closest_to_plane_v3(), copy_m4_m3(), ED_view3d_win_to_3d_on_plane(), isect_plane_plane_v3(), mul_m4_v3(), normalize_v3(), rotation_between_vecs_to_mat3(), and transform_pivot_set_m4().
Referenced by view3d_win_to_3d_on_plane_maybe_fallback().
| void ED_view3d_win_to_3d_with_shift | ( | const View3D * | v3d, |
| const ARegion * | region, | ||
| const float | depth_pt[3], | ||
| const float | mval[2], | ||
| float | r_out[3] ) |
Calculate a 3D location from 2D window coordinates including camera shift.
| region | The region (used for the window width and height). |
| depth_pt | The reference location used to calculate the Z depth. |
| mval | The area relative location (such as event->mval converted to floats). |
| r_out | The resulting world-space location. |
Definition at line 534 of file view3d_project.cc.
References BKE_camera_sensor_fit(), BKE_screen_view3d_zoom_to_fac(), RegionView3D::camdx, RegionView3D::camdy, View3D::camera, CAMERA_SENSOR_FIT_HOR, RegionView3D::camzoom, copy_v3_v3(), Object::data, ED_view3d_win_to_vector(), fabsf, float, RegionView3D::is_persp, isect_ray_plane_v3_factor(), madd_v3_v3v3fl(), RegionView3D::persinv, RegionView3D::persp, ray_point_factor_v3(), ARegion::regiondata, RV3D_CAMOB, Camera::sensor_fit, Camera::shiftx, Camera::shifty, RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by blender::ed::greasepencil::DrawingPlacement::project_with_shift().
| void ED_view3d_win_to_delta | ( | const ARegion * | region, |
| const float | xy_delta[2], | ||
| float | zfac, | ||
| float | r_out[3], | ||
| bool | precise = false ) |
Calculate a 3D difference vector from 2D window offset.
When the zfac is calculated based on a world-space location directly under the cursor, the value of r_out can be subtracted from RegionView3D.ofs to pan the view with the contents following the cursor perfectly (without sliding).
| region | The region (used for the window width and height). |
| xy_delta | 2D difference (in pixels) such as event->mval[0] - other_x. |
| zfac | The depth result typically calculated by ED_view3d_calc_zfac (see its doc-string for details). |
| r_out | The resulting world-space delta. |
| precise | Use a more precise calculation but increases the cost of this function. |
Definition at line 674 of file view3d_project.cc.
References invert_m4_m4(), mul_mat3_m4_v3(), RegionView3D::persinv, ARegion::regiondata, RegionView3D::viewinv, RegionView3D::winmat, ARegion::winx, and ARegion::winy.
Referenced by annotation_stroke_convertcoords(), brush_edit_apply(), blender::ed::sculpt_paint::calc_local_from_screen(), blender::ed::transform::convertViewVec(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), mesh_bisect_interactive_calc(), move3d_get_translate(), paint_calc_object_space_radius(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::ed::sculpt_paint::project_brush_radius_grease_pencil(), view3d_zoom_border_exec(), view_zoom_to_window_xy_3d(), and viewmove_apply().
Calculate a 3D origin from 2D window coordinates.
| region | The region (used for the window width and height). |
| mval | The area relative 2D location (such as event->mval converted to float). |
| r_out | The resulting normalized world-space direction vector. |
Definition at line 699 of file view3d_project.cc.
References copy_v3_v3(), RegionView3D::is_persp, mul_project_m4_v3(), RegionView3D::persinv, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by ED_view3d_win_to_3d_on_plane(), ED_view3d_win_to_ray(), blender::ed::sculpt_paint::raycast_init(), and view3d_win_to_ray_segment().
| void ED_view3d_win_to_ray | ( | const ARegion * | region, |
| const float | mval[2], | ||
| float | r_ray_start[3], | ||
| float | r_ray_normal[3] ) |
Calculate a 3D viewpoint and direction vector from 2D window coordinates. This ray_start is located at the viewpoint, ray_normal is the direction towards mval.
| region | The region (used for the window width and height). |
| mval | The area relative 2D location (such as event->mval, converted into float[2]). |
| r_ray_start | The world-space point where the ray intersects the window plane. |
| r_ray_normal | The normalized world-space direction of towards mval. |
Definition at line 414 of file view3d_project.cc.
References ED_view3d_win_to_origin(), and ED_view3d_win_to_vector().
Referenced by gizmo_arrow_modal(), and blender::ed::object::object_transform_axis_target_calc_depth_init().
| bool ED_view3d_win_to_ray_clipped | ( | Depsgraph * | depsgraph, |
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const float | mval[2], | ||
| float | r_ray_start[3], | ||
| float | r_ray_normal[3], | ||
| bool | do_clip_planes ) |
Calculate a 3D viewpoint and direction vector from 2D window coordinates. This ray_start is located at the viewpoint, ray_normal is the direction towards mval. ray_start is clipped by the view near limit so points in front of it are always in view. In orthographic view the resulting ray_normal will match the view vector.
| region | The region (used for the window width and height). |
| v3d | The 3D viewport (used for near clipping value). |
| mval | The area relative 2D location (such as event->mval, converted into float[2]). |
| r_ray_start | The world-space point where the ray intersects the window plane. |
| r_ray_normal | The normalized world-space direction of towards mval. |
| do_clip_planes | Optionally clip the start of the ray by the view clipping planes. |
Definition at line 394 of file view3d_project.cc.
References depsgraph, and ED_view3d_win_to_ray_clipped_ex().
Referenced by EDBM_unified_findnearest_from_raycast(), blender::ed::greasepencil::grease_pencil_reproject_exec(), knife_snap_angle_relative(), knife_snap_update_from_mval(), and knife_start_cut().
| bool ED_view3d_win_to_ray_clipped_ex | ( | Depsgraph * | depsgraph, |
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const float | mval[2], | ||
| const bool | do_clip_planes, | ||
| float | r_ray_co[3], | ||
| float | r_ray_normal[3], | ||
| float | r_ray_start[3], | ||
| float | r_ray_end[3] ) |
Calculate a 3D viewpoint and direction vector from 2D window coordinates. This ray_start is located at the viewpoint, ray_normal is the direction towards mval. ray_start is clipped by the view near limit so points in front of it are always in view. In orthographic view the resulting ray_normal will match the view vector. This version also returns the ray_co point of the ray on window plane, useful to fix precision issues especially with orthographic view, where default ray_start is set rather far away.
| region | The region (used for the window width and height). |
| v3d | The 3D viewport (used for near clipping value). |
| mval | The area relative 2D location (such as event->mval, converted into float[2]). |
| do_clip_planes | Optionally clip the start of the ray by the view clipping planes. |
| r_ray_co | The world-space point where the ray intersects the window plane. |
| r_ray_normal | The normalized world-space direction of towards mval. |
| r_ray_start | The world-space starting point of the ray. |
| r_ray_end | The world-space end point of the segment. |
Definition at line 372 of file view3d_project.cc.
References depsgraph, ED_view3d_clip_segment(), ARegion::regiondata, and view3d_win_to_ray_segment().
Referenced by ED_view3d_win_to_ray_clipped(), blender::ed::transform::object_project_all_view3d_ex(), and blender::ed::transform::snap_object_project_view3d_ex().
| bool ED_view3d_win_to_segment_clipped | ( | const Depsgraph * | depsgraph, |
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const float | mval[2], | ||
| float | r_ray_start[3], | ||
| float | r_ray_end[3], | ||
| bool | do_clip_planes ) |
Calculate a 3D segment from 2D window coordinates. This ray_start is located at the viewpoint, ray_end is a far point. ray_start and ray_end are clipped by the view near and far limits so points along this line are always in view. In orthographic view all resulting segments will be parallel.
| region | The region (used for the window width and height). |
| v3d | The 3D viewport (used for near and far clipping range). |
| mval | The area relative 2D location (such as event->mval, converted into float[2]). |
| r_ray_start | The world-space starting point of the segment. |
| r_ray_end | The world-space end point of the segment. |
| do_clip_planes | Optionally clip the ray by the view clipping planes. |
Definition at line 737 of file view3d_project.cc.
References depsgraph, ED_view3d_clip_segment(), ARegion::regiondata, and view3d_win_to_ray_segment().
Referenced by BMBVH_EdgeVisible(), brush_add_count_iter(), imapaint_pick_face(), knife_find_line_hits(), knife_input_ray_segment(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::raycast_init(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::sample_curves_surface_3d_brush(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), and blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry().
Calculate a 3D direction vector from 2D window coordinates. The resulting direction points away from the view-point, making the result useful to perform ray-casts into a 3D scene. In orthographic view all input coordinates result in the same vector.
| region | The region (used for the window width and height). |
| mval | The area relative 2D location (such as event->mval converted to float). |
| r_out | The resulting normalized world-space direction vector. |
Definition at line 720 of file view3d_project.cc.
References RegionView3D::is_persp, mul_project_m4_v3(), negate_v3_v3(), normalize_v3(), RegionView3D::persinv, ARegion::regiondata, sub_v3_v3(), RegionView3D::viewinv, ARegion::winx, and ARegion::winy.
Referenced by ED_view3d_win_to_3d(), ED_view3d_win_to_3d_on_plane(), ED_view3d_win_to_3d_with_shift(), ED_view3d_win_to_ray(), gizmo_find_intersected_3d_intern(), ViewOpsData::init_navigation(), mesh_bisect_interactive_calc(), blender::ed::greasepencil::DrawingPlacement::project_depth(), and view3d_win_to_ray_segment().
| bool edge_inside_circle | ( | const float | cent[2], |
| float | radius, | ||
| const float | screen_co_a[2], | ||
| const float | screen_co_b[2] ) |
XXX: should move to BLI_math
Definition at line 3758 of file view3d_select.cc.
References dist_squared_to_line_segment_v2().
Referenced by do_circle_select_armature__doSelectBone(), do_circle_select_armature__doSelectBone_clip_content(), do_circle_select_pose__doSelectBone(), gpencil_stroke_inside_circle(), and mesh_circle_doSelectEdge().
| ENUM_OPERATORS | ( | eV3DProjStatus | , |
| V3D_PROJ_RET_OVERFLOW | ) |
References V3D_PROJ_RET_OVERFLOW.
| ENUM_OPERATORS | ( | eV3DProjTest | , |
| V3D_PROJ_TEST_CLIP_CONTENT | ) |
References V3D_PROJ_TEST_CLIP_CONTENT.
| void lattice_foreachScreenVert | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, BPoint *bp, const float screen_co[2]), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 730 of file view3d_iterators.cc.
References BKE_displist_find(), Object::data, Lattice::def, DL_VERTS, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), ED_view3d_project_float_object(), Lattice::editlatt, BPoint::hide, i, EditLatt::latt, N, ViewContext::obedit, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, ViewContext::region, Object::runtime, ViewContext::rv3d, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, BPoint::vec, and DispList::verts.
Referenced by do_lasso_select_lattice(), do_lattice_box_select(), findnearestLattvert(), and lattice_circle_select().
| void mball_foreachScreenElem | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, MetaElem *ml, const float screen_co[2]), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
ED_view3d_init_mats_rv3d must be called first.
Definition at line 703 of file view3d_iterators.cc.
References Object::data, ED_view3d_check_mats_rv3d(), ED_view3d_project_float_object(), MetaBall::editelems, LISTBASE_FOREACH, ViewContext::obedit, ViewContext::region, ViewContext::rv3d, V3D_PROJ_RET_OK, and MetaElem::x.
Referenced by do_lasso_select_meta(), and mball_circle_select().
| void mesh_foreachScreenEdge | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 399 of file view3d_iterators.cc.
References BKE_mesh_foreach_mapped_edge(), BKE_mesh_wrapper_ensure_subdivision(), BMEditMesh::bm, BM_EDGE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, content_planes_from_clip_flag(), data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), blender::bke::editbmesh_get_eval_cage_from_orig(), ViewContext::em, mesh_foreachScreenEdge__mapFunc(), ViewContext::obedit, ViewContext::region, ViewContext::rv3d, ViewContext::scene, BMesh::totedge, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_CONTENT, ARegion::winx, and ARegion::winy.
Referenced by EDBM_edge_find_nearest_ex().
| void mesh_foreachScreenEdge_clip_bb_segment | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
A version of mesh_foreachScreenEdge that clips the segment when there is a clipping bounding box.
Definition at line 489 of file view3d_iterators.cc.
References BKE_mesh_foreach_mapped_edge(), BKE_mesh_wrapper_ensure_subdivision(), BMEditMesh::bm, BM_EDGE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, RegionView3D::clipbb, content_planes_from_clip_flag(), data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), blender::bke::editbmesh_get_eval_cage_from_orig(), ViewContext::em, mesh_foreachScreenEdge__mapFunc(), mesh_foreachScreenEdge_clip_bb_segment__mapFunc(), ViewContext::obedit, ViewContext::region, ViewContext::rv3d, ViewContext::scene, BMesh::totedge, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_CONTENT, ARegion::winx, and ARegion::winy.
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), and mesh_circle_select().
| void mesh_foreachScreenFace | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, BMFace *efa, const float screen_co[2], int index), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 566 of file view3d_iterators.cc.
References BKE_mesh_foreach_mapped_face_center(), BKE_mesh_foreach_mapped_subdiv_face_center(), BKE_mesh_wrapper_ensure_subdivision(), BLI_assert, BMEditMesh::bm, BM_FACE, BM_mesh_elem_table_ensure(), CD_MASK_BAREMESH, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), blender::bke::editbmesh_get_eval_cage_from_orig(), ViewContext::em, MESH_FOREACH_NOP, mesh_foreachScreenFace__mapFunc(), ViewContext::obedit, Mesh::runtime, ViewContext::rv3d, ViewContext::scene, V3D_PROJ_TEST_CLIP_CONTENT, and Mesh::verts_num.
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), EDBM_face_find_nearest_ex(), and mesh_circle_select().
| void mesh_foreachScreenVert | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, BMVert *eve, const float screen_co[2], int index), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 337 of file view3d_iterators.cc.
References BKE_mesh_foreach_mapped_vert(), BKE_mesh_wrapper_ensure_subdivision(), BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, CD_MASK_BAREMESH, data, ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), blender::bke::editbmesh_get_eval_cage_from_orig(), ViewContext::em, MESH_FOREACH_NOP, mesh_foreachScreenVert__mapFunc(), ViewContext::obedit, ViewContext::rv3d, ViewContext::scene, and V3D_PROJ_TEST_CLIP_BB.
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), EDBM_vert_find_nearest_ex(), and mesh_circle_select().
| void meshobject_foreachScreenVert | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, const float screen_co[2], int index), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 285 of file view3d_iterators.cc.
References Geometry::attributes, BKE_mesh_foreach_mapped_vert(), BKE_object_get_evaluated_mesh(), BLI_assert, data, DEG_get_evaluated(), ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), blender::bke::AttributeAccessor::lookup(), MESH_FOREACH_NOP, meshobject_foreachScreenVert__mapFunc(), ViewContext::obact, blender::bke::Point, ViewContext::rv3d, V3D_PROJ_TEST_CLIP_BB, and V3D_PROJ_TEST_CLIP_CONTENT.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), and paint_vertsel_circle_select().
| void nurbs_foreachScreenVert | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, bool handle_visible, const float screen_co[2]), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
Definition at line 604 of file view3d_iterators.cc.
References Nurb::bezt, BEZT_ISSEL_ANY, BKE_curve_editNurbs_get(), Nurb::bp, CU_BEZIER, CURVE_HANDLE_NONE, CURVE_HANDLE_SELECTED, Object::data, ED_view3d_check_mats_rv3d(), ED_view3d_clipping_local(), ED_view3d_project_float_object(), View3DOverlay::handle_display, handles_visible(), BezTriple::hide, BPoint::hide, i, LISTBASE_FOREACH, ViewContext::obedit, View3D::overlay, Nurb::pntsu, Nurb::pntsv, ViewContext::region, ViewContext::rv3d, Nurb::type, ViewContext::v3d, V3D_PROJ_RET_CLIP_BB, V3D_PROJ_RET_CLIP_WIN, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, BezTriple::vec, and BPoint::vec.
Referenced by do_lasso_select_curve(), do_nurbs_box_select(), ED_curve_pick_vert_ex(), and nurbscurve_circle_select().
| void pose_foreachScreenBone | ( | const ViewContext * | vc, |
| void(* | func )(void *user_data, bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]), | ||
| void * | user_data, | ||
| eV3DProjTest | clip_flag ) |
ED_view3d_init_mats_rv3d must be called first.
Definition at line 837 of file view3d_iterators.cc.
References BKE_pose_channel_find_name(), blender::animrig::bone_is_visible(), bPose::chanbase, content_planes_from_clip_flag(), Object::data, DEG_get_evaluated(), ViewContext::depsgraph, ED_view3d_check_mats_rv3d(), LISTBASE_FOREACH, bPoseChannel::name, ViewContext::obact, Object::pose, bPoseChannel::pose_head, bPoseChannel::pose_tail, ViewContext::region, ViewContext::rv3d, V3D_PROJ_TEST_CLIP_CONTENT, view3d_project_segment_to_screen_with_clip_tag(), view3d_project_segment_to_screen_with_content_clip_planes(), ARegion::winx, ARegion::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by do_lasso_tag_pose(), and pose_circle_select().
| int view3d_gpu_select | ( | const ViewContext * | vc, |
| GPUSelectBuffer * | buffer, | ||
| const rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter ) |
Definition at line 739 of file view3d_view.cc.
References input, and view3d_gpu_select_ex().
Referenced by do_armature_box_select(), do_meta_box_select(), do_object_box_select(), do_pose_box_select(), ed_mball_findnearest_metaelem(), mixed_bones_object_selectbuffer(), and view3d_gpu_select_with_id_filter().
| void view3d_gpu_select_cache_begin | ( | ) |
Optionally cache data for multiple calls to view3d_gpu_select
just avoid GPU_select headers outside this file
Definition at line 479 of file view3d_view.cc.
References GPU_select_cache_begin().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| void view3d_gpu_select_cache_end | ( | ) |
Definition at line 484 of file view3d_view.cc.
References GPU_select_cache_end().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| int view3d_gpu_select_ex | ( | const ViewContext * | vc, |
| GPUSelectBuffer * | buffer, | ||
| const rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter, | ||
| bool | do_material_slot_selection ) |
Definition at line 550 of file view3d_view.cc.
References BKE_modifiers_get_virtual_modifierlist(), BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, BLI_linklist_prepend_alloca, BLI_rcti_init_pt_radius(), DrawSelectLoopUserData::buffer, ViewContext::C, CTX_wm_manager(), depsgraph, ViewContext::depsgraph, DRW_draw_select_loop(), DRW_gpu_context_disable(), DRW_gpu_context_enable(), drw_select_filter_object_mode_lock(), drw_select_filter_object_mode_lock_for_weight_paint(), drw_select_loop_pass(), ED_view3d_draw_setup_view(), eModifierType_Armature, eModifierType_GreasePencilArmature, G, G_FLAG_PICKSEL, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_SELECT_ALL, GPU_select_begin_next(), GPU_select_cache_end(), GPU_select_cache_load_id(), GPU_select_end(), GPU_SELECT_INVALID, GPU_select_is_cached(), DrawSelectLoopUserData::gpu_select_mode, GPU_SELECT_PICK_ALL, GPU_SELECT_PICK_NEAREST, DrawSelectLoopUserData::hits, input, Object::mode, ModifierData::next, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_OBJECT, OB_MODE_POSE, OB_WIRE, ViewContext::obact, ViewContext::obedit, ArmatureModifierData::object, GreasePencilArmatureModifierData::object, DrawSelectLoopUserData::pass, DrawSelectLoopUserData::rect, ViewContext::region, RGN_TYPE_WINDOW, ViewContext::rv3d, ViewContext::scene, View3D::shading, SPACE_VIEW3D, ModifierData::type, View3DShading::type, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), ViewContext::v3d, VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK, VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK, VIEW3D_SELECT_PICK_ALL, VIEW3D_SELECT_PICK_NEAREST, ViewContext::view_layer, RegionView3D::viewmat, ViewContext::win, XRAY_ACTIVE, XRAY_ENABLED, and xy.
Referenced by mixed_bones_object_selectbuffer(), and view3d_gpu_select().
| int view3d_gpu_select_with_id_filter | ( | const ViewContext * | vc, |
| GPUSelectBuffer * | buffer, | ||
| const rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter, | ||
| uint | select_id ) |
Definition at line 748 of file view3d_view.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), GPU_select_buffer_remove_by_id(), input, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), GPUSelectBuffer::storage, and view3d_gpu_select().
Referenced by ed_armature_pick_bone_impl(), and get_nearest_editbonepoint().
| void view3d_operator_needs_gpu | ( | const bContext * | C | ) |
Use this call when executing an operator, event system doesn't set for each event the OpenGL drawing context.
Definition at line 231 of file view3d_utils.cc.
References C, CTX_wm_region(), and view3d_region_operator_needs_gpu().
Referenced by armature_select_linked_pick_invoke(), armature_shortest_path_pick_invoke(), brush_edit_apply(), brush_stroke_init(), curve_draw_invoke(), blender::ed::curves::curves_draw_invoke(), depthdropper_depth_sample_pt(), ED_curve_editnurb_select_pick(), ED_view3d_cursor3d_position(), ed_view3d_give_base_under_cursor_ex(), 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(), loopcut_init(), loopcut_modal(), blender::ed::object::object_transform_axis_target_modal(), paint_proj_new_stroke(), paint_proj_stroke(), paint_select_linked_pick_invoke(), paintface_select_loop_invoke(), paintvert_select_linked_pick_invoke(), pose_select_connected_invoke(), 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(), weight_sample_group_invoke(), weight_sample_invoke(), and wpaint_stroke_update_step().
| void view3d_region_operator_needs_gpu | ( | ARegion * | region | ) |
Definition at line 238 of file view3d_utils.cc.
References GPU_matrix_projection_set, GPU_matrix_set, printf, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RegionView3D::viewmat, RegionView3D::winmat, ARegion::winrct, and wmViewport().
Referenced by annotation_paint_strokeend(), annotation_stroke_addpoint(), annotation_stroke_doeraser(), and view3d_operator_needs_gpu().