Blender V4.3
ED_view3d.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
13#include "BLI_utildefines.h"
14
15#include "DNA_scene_types.h"
16
17/* ********* exports for space_view3d/ module ********** */
18struct ARegion;
19struct BMEdge;
20struct BMElem;
21struct BMEditMesh;
22struct BMFace;
23struct BMVert;
24struct BPoint;
25struct Base;
26struct BezTriple;
27struct BoundBox;
28struct Camera;
30struct Depsgraph;
31struct EditBone;
32struct GPUSelectBuffer;
33struct ID;
34struct Main;
35struct MetaElem;
36struct Nurb;
37struct Object;
38struct RV3DMatrixStore;
39struct RegionView3D;
40struct RenderEngineType;
41struct Scene;
42struct ScrArea;
44struct View3D;
45struct ViewContext;
46struct ViewLayer;
47struct ViewOpsData;
48struct bContext;
49struct bPoseChannel;
50struct bScreen;
51struct rctf;
52struct rcti;
53struct wmEvent;
54struct wmGizmo;
55struct wmKeyMapItem;
56struct wmOperator;
57struct wmWindow;
58struct wmWindowManager;
59
64 /* Dependency graph is uses for depth drawing, viewport camera matrix access, and also some areas
65 * are re-using this to access evaluated entities.
66 *
67 * Moral of the story: assign to a fully evaluated state. */
68 Depsgraph *depsgraph;
78 int mval[2];
79};
80
81struct ViewDepths {
82 unsigned short w, h;
83 /* only for temp use for sub-rectangles, added to `region->winx/winy`. */
84 short x, y;
85 float *depths;
86 double depth_range[2];
87};
88
89/* Rotate 3D cursor on placement. */
96
97void ED_view3d_background_color_get(const Scene *scene, const View3D *v3d, float r_color[3]);
98void ED_view3d_text_colors_get(const Scene *scene,
99 const View3D *v3d,
100 float r_text_color[4],
101 float r_shadow_color[4]);
103 const Object *ob,
104 const View3D *v3d);
111 const int mval[2],
112 bool use_depth,
113 float r_cursor_co[3]);
115 const int mval[2],
116 bool use_depth,
117 enum eV3DCursorOrient orientation,
118 float r_cursor_co[3],
119 float r_cursor_quat[4]);
121 const int mval[2],
122 bool use_depth,
123 enum eV3DCursorOrient orientation);
124
126
135void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], float dist);
144void ED_view3d_from_m4(const float mat[4][4], float ofs[3], float quat[4], const float *dist);
145
155 const Object *ob, float ofs[3], float quat[4], const float *dist, float *lens);
166 const Depsgraph *depsgraph, Object *ob, const float ofs[3], const float quat[4], float dist);
167
169 Depsgraph *depsgraph,
170 const Scene *scene,
171 Object *camera_ob);
172
174 Depsgraph *depsgraph,
175 const Scene *scene,
176 Object *camera_ob);
177
182
183/* Depth buffer */
202void ED_view3d_depth_override(Depsgraph *depsgraph,
203 ARegion *region,
204 View3D *v3d,
205 Object *obact,
207 ViewDepths **r_depths);
210 const int mval[2],
211 int margin,
212 float *r_depth);
214 const ViewDepths *depths,
215 const int mval[2],
216 float r_normal[3]);
217bool ED_view3d_depth_unproject_v3(const ARegion *region,
218 const int mval[2],
219 double depth,
220 float r_location_world[3]);
221
222bool ED_view3d_has_depth_buffer_updated(const Depsgraph *depsgraph, const View3D *v3d);
223
233 ViewOpsData *vod,
234 const wmEvent *event,
235 const float depth_loc_override[3]);
237
238/* Projection */
239#define IS_CLIPPED 12000
240
241/* return values for ED_view3d_project_...() */
263
264/* some clipping tests are optional */
295
296#define V3D_PROJ_TEST_CLIP_DEFAULT \
297 (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR)
298#define V3D_PROJ_TEST_ALL \
299 (V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_FAR | V3D_PROJ_TEST_CLIP_ZERO | \
300 V3D_PROJ_TEST_CLIP_CONTENT)
301
302#define V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT \
303 (V3D_PROJ_TEST_CLIP_CONTENT | V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_FAR | \
304 V3D_PROJ_TEST_CLIP_WIN)
305
306/* `view3d_snap.cc` */
307
309 wmOperator *op,
310 const float snap_target_global[3],
311 int pivot_point);
312
313/* `view3d_cursor_snap.cc` */
314
315#define USE_SNAP_DETECT_FROM_KEYMAP_HACK
324
328 float loc[3];
329 float nor[3];
330 float obmat[4][4];
331 int elem_index[3];
332 float plane_omat[3][3];
334
337};
338
340 /* Setup. */
345 float *prevpoint;
350
351 bool (*poll)(ARegion *region, void *custom_poll_data);
353};
354
361 const float prev_point[3]);
363 V3DSnapCursorState *state, const bContext *C, const ARegion *region, int x, int y);
367 const float source_loc[3],
368 const float target_loc[3],
369 const eSnapMode source_type,
370 const eSnapMode target_type,
371 const uchar source_color[4],
372 const uchar target_color[4]);
373
374/* `view3d_iterators.cc` */
375
376/* foreach iterators */
377
379 void (*func)(void *user_data,
380 const float screen_co[2],
381 int index),
382 void *user_data,
383 eV3DProjTest clip_flag);
385 const ViewContext *vc,
386 void (*func)(void *user_data, BMVert *eve, const float screen_co[2], int index),
387 void *user_data,
388 eV3DProjTest clip_flag);
390 void (*func)(void *user_data,
391 BMEdge *eed,
392 const float screen_co_a[2],
393 const float screen_co_b[2],
394 int index),
395 void *user_data,
396 eV3DProjTest clip_flag);
397
403 void (*func)(void *user_data,
404 BMEdge *eed,
405 const float screen_co_a[2],
406 const float screen_co_b[2],
407 int index),
408 void *user_data,
409 eV3DProjTest clip_flag);
410
412 const ViewContext *vc,
413 void (*func)(void *user_data, BMFace *efa, const float screen_co[2], int index),
414 void *user_data,
415 eV3DProjTest clip_flag);
417 void (*func)(void *user_data,
418 Nurb *nu,
419 BPoint *bp,
420 BezTriple *bezt,
421 int beztindex,
422 bool handle_visible,
423 const float screen_co[2]),
424 void *user_data,
425 eV3DProjTest clip_flag);
430 void (*func)(void *user_data, MetaElem *ml, const float screen_co[2]),
431 void *user_data,
432 eV3DProjTest clip_flag);
434 void (*func)(void *user_data, BPoint *bp, const float screen_co[2]),
435 void *user_data,
436 eV3DProjTest clip_flag);
441 void (*func)(void *user_data,
442 EditBone *ebone,
443 const float screen_co_a[2],
444 const float screen_co_b[2]),
445 void *user_data,
446 eV3DProjTest clip_flag);
447
452 void (*func)(void *user_data,
453 bPoseChannel *pchan,
454 const float screen_co_a[2],
455 const float screen_co_b[2]),
456 void *user_data,
457 eV3DProjTest clip_flag);
458/* *** end iterators *** */
459
460/* `view3d_project.cc` */
461
466 const float co[3],
467 const blender::float4x4 &mat);
471void ED_view3d_project_float_v3_m4(const ARegion *region,
472 const float co[3],
473 float r_co[3],
474 const float mat[4][4]);
475
476eV3DProjStatus ED_view3d_project_base(const ARegion *region, Base *base, float r_co[2]);
477
478/* *** short *** */
480 float perspmat[4][4],
481 bool is_local,
482 const float co[3],
483 short r_co[2],
485/* --- short --- */
487 const float co[3],
488 short r_co[2],
490/* object space, use ED_view3d_init_mats_rv3d before calling */
492 const float co[3],
493 short r_co[2],
495
496/* *** int *** */
498 float perspmat[4][4],
499 bool is_local,
500 const float co[3],
501 int r_co[2],
503/* --- int --- */
505 const float co[3],
506 int r_co[2],
508/* object space, use ED_view3d_init_mats_rv3d before calling */
510 const float co[3],
511 int r_co[2],
513
514/* *** float *** */
516 float perspmat[4][4],
517 bool is_local,
518 const float co[3],
519 float r_co[2],
521/* --- float --- */
523 const float co[3],
524 float r_co[2],
530 const float co[3],
531 float r_co[2],
533
534float ED_view3d_pixel_size(const RegionView3D *rv3d, const float co[3]);
535float ED_view3d_pixel_size_no_ui_scale(const RegionView3D *rv3d, const float co[3]);
536
547float ED_view3d_calc_zfac_ex(const RegionView3D *rv3d, const float co[3], bool *r_flip);
549float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3]);
553float ED_view3d_calc_depth_for_comparison(const RegionView3D *rv3d, const float co[3]);
554
555bool ED_view3d_clip_segment(const RegionView3D *rv3d, float ray_start[3], float ray_end[3]);
570 const ARegion *region,
571 const View3D *v3d,
572 const float mval[2],
573 float r_ray_start[3],
574 float r_ray_normal[3],
575 bool do_clip_planes);
594 const ARegion *region,
595 const View3D *v3d,
596 const float mval[2],
597 const bool do_clip_planes,
598 float r_ray_co[3],
599 float r_ray_normal[3],
600 float r_ray_start[3],
601 float r_ray_end[3]);
613void ED_view3d_win_to_ray(const ARegion *region,
614 const float mval[2],
615 float r_ray_start[3],
616 float r_ray_normal[3]);
624void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3]);
632void ED_view3d_win_to_3d(const View3D *v3d,
633 const ARegion *region,
634 const float depth_pt[3],
635 const float mval[2],
636 float r_out[3]);
637void ED_view3d_win_to_3d_int(const View3D *v3d,
638 const ARegion *region,
639 const float depth_pt[3],
640 const int mval[2],
641 float r_out[3]);
642bool ED_view3d_win_to_3d_on_plane(const ARegion *region,
643 const float plane[4],
644 const float mval[2],
645 bool do_clip,
646 float r_out[3]);
655 const float plane[4],
656 const float mval[2],
657 bool do_clip,
658 const float plane_fallback[4],
659 float r_out[3]);
661 const ARegion *region, const float plane[4], const int mval[2], bool do_clip, float r_out[3]);
678void ED_view3d_win_to_delta(const ARegion *region,
679 const float xy_delta[2],
680 float zfac,
681 float r_out[3]);
692void ED_view3d_win_to_origin(const ARegion *region, const float mval[2], float r_out[3]);
706void ED_view3d_win_to_vector(const ARegion *region, const float mval[2], float r_out[3]);
721bool ED_view3d_win_to_segment_clipped(const Depsgraph *depsgraph,
722 const ARegion *region,
723 const View3D *v3d,
724 const float mval[2],
725 float r_ray_start[3],
726 float r_ray_end[3],
727 bool do_clip_planes);
730 const blender::float4x4 &obmat);
731
736void ED_view3d_project_v3(const ARegion *region, const float world[3], float r_region_co[3]);
737void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2]);
739 const ARegion *region, float regionx, float regiony, float regionz, float world[3]);
740
741/* end */
742
743void ED_view3d_dist_range_get(const View3D *v3d, float r_dist_range[2]);
747bool ED_view3d_clip_range_get(const Depsgraph *depsgraph,
748 const View3D *v3d,
749 const RegionView3D *rv3d,
750 bool use_ortho_factor,
751 float *r_clip_start,
752 float *r_clip_end);
753bool ED_view3d_viewplane_get(const Depsgraph *depsgraph,
754 const View3D *v3d,
755 const RegionView3D *rv3d,
756 int winx,
757 int winy,
758 rctf *r_viewplane,
759 float *r_clip_start,
760 float *r_clip_end,
761 float *r_pixsize);
762
766void ED_view3d_polygon_offset(const RegionView3D *rv3d, float dist);
767
768void ED_view3d_calc_camera_border(const Scene *scene,
769 const Depsgraph *depsgraph,
770 const ARegion *region,
771 const View3D *v3d,
772 const RegionView3D *rv3d,
773 bool no_shift,
774 rctf *r_viewborder);
776 Depsgraph *depsgraph,
777 const ARegion *region,
778 const View3D *v3d,
779 const RegionView3D *rv3d,
780 float r_size[2]);
782 const Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, rcti *r_rect);
783
784void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const BoundBox *bb, bool is_flip);
786 BoundBox *bb, float planes[4][4], const ARegion *region, const Object *ob, const rcti *rect);
799bool ED_view3d_clipping_clamp_minmax(const RegionView3D *rv3d, float min[3], float max[3]);
800
801void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4]);
811bool ED_view3d_clipping_test(const RegionView3D *rv3d, const float co[3], bool is_local);
812
813float ED_view3d_radius_to_dist_persp(float angle, float radius);
814float ED_view3d_radius_to_dist_ortho(float lens, float radius);
840float ED_view3d_radius_to_dist(const View3D *v3d,
841 const ARegion *region,
842 const Depsgraph *depsgraph,
843 char persp,
844 bool use_aspect,
845 float radius);
846
851int ED_view3d_backbuf_sample_size_clamp(ARegion *region, float dist);
852
854
856bool ED_view3d_autodist_last_check(wmWindow *win, const wmEvent *event);
861bool ED_view3d_autodist_last_get(wmWindow *win, float r_ofs[3]);
863 const wmEvent *event,
864 const float ofs[3],
865 const bool has_depth);
868
877bool ED_view3d_autodist(ARegion *region,
878 View3D *v3d,
879 const int mval[2],
880 float mouse_worldloc[3],
881 const float fallback_depth_pt[3]);
882
887 const int mval[2],
888 float mouse_worldloc[3],
889 int margin,
890 const float *force_depth);
892 const int mval_sta[2],
893 const int mval_end[2],
894 int margin,
895 float *r_depth);
896
901 GPUTexture *tex = nullptr;
902 blender::ushort4 *data = nullptr;
903 int tex_w, tex_h;
904 rcti valid_rect;
905
906 public:
909
910 bool init(ARegion *region);
911 bool sample(const int mval[2], float r_col[3]);
912};
913
915 /* all elements in the region, ignore depth */
917 /* pick also depth sorts (only for small regions!) */
919 /* sorts and only returns visible objects (only for small regions!) */
921};
922
931
933
941
946 GPUSelectBuffer *buffer,
947 const rcti *input,
948 eV3DSelectMode select_mode,
949 eV3DSelectObjectFilter select_filter,
950 bool do_material_slot_selection);
952 GPUSelectBuffer *buffer,
953 const rcti *input,
954 eV3DSelectMode select_mode,
955 eV3DSelectObjectFilter select_filter);
957 GPUSelectBuffer *buffer,
958 const rcti *input,
959 eV3DSelectMode select_mode,
960 eV3DSelectObjectFilter select_filter,
961 uint select_id);
962
963/* `view3d_select.cc` */
964
967
990
992bool edge_inside_circle(const float cent[2],
993 float radius,
994 const float screen_co_a[2],
995 const float screen_co_b[2]);
996
1005bool ED_view3d_context_user_region(bContext *C, View3D **r_v3d, ARegion **r_region);
1010bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion **r_region);
1012
1025void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d);
1026void ED_view3d_init_mats_rv3d_gl(const Object *ob, RegionView3D *rv3d);
1027#ifndef NDEBUG
1033#else
1034# define ED_view3d_clear_mats_rv3d(rv3d) (void)(rv3d)
1035# define ED_view3d_check_mats_rv3d(rv3d) (void)(rv3d)
1036#endif
1037
1040
1041RenderEngineType *ED_view3d_engine_type(const Scene *scene, int drawtype);
1042
1048 wmWindow *win,
1049 Depsgraph *depsgraph,
1050 Scene *scene,
1051 ARegion *region,
1052 View3D *v3d,
1053 const float viewmat[4][4],
1054 const float winmat[4][4],
1055 const rcti *rect);
1056
1060Base *ED_view3d_give_base_under_cursor(bContext *C, const int mval[2]);
1061Object *ED_view3d_give_object_under_cursor(bContext *C, const int mval[2]);
1063 const int mval[2],
1064 int *r_material_slot);
1065bool ED_view3d_is_object_under_cursor(bContext *C, const int mval[2]);
1069void ED_view3d_quadview_update(ScrArea *area, ARegion *region, bool do_clip);
1073void ED_view3d_update_viewmat(const Depsgraph *depsgraph,
1074 const Scene *scene,
1075 View3D *v3d,
1076 ARegion *region,
1077 const float viewmat[4][4],
1078 const float winmat[4][4],
1079 const rcti *rect,
1080 bool offscreen);
1081bool ED_view3d_quat_from_axis_view(char view, char view_axis_roll, float r_quat[4]);
1082bool ED_view3d_quat_to_axis_view(const float quat[4],
1083 float epsilon,
1084 char *r_view,
1085 char *r_view_axis_roll);
1093 float epsilon,
1094 char *r_view,
1095 char *r_view_axis_roll);
1096
1097char ED_view3d_lock_view_from_index(int index);
1098char ED_view3d_axis_view_opposite(char view);
1099bool ED_view3d_lock(RegionView3D *rv3d);
1100
1101void ED_view3d_datamask(const Scene *scene,
1102 ViewLayer *view_layer,
1103 const View3D *v3d,
1104 CustomData_MeshMasks *r_cddata_masks);
1108void ED_view3d_screen_datamask(const Scene *scene,
1109 ViewLayer *view_layer,
1110 const bScreen *screen,
1111 CustomData_MeshMasks *r_cddata_masks);
1112
1113bool ED_view3d_offset_lock_check(const View3D *v3d, const RegionView3D *rv3d);
1121void ED_view3d_persp_switch_from_camera(const Depsgraph *depsgraph,
1122 View3D *v3d,
1123 RegionView3D *rv3d,
1124 char persp);
1131bool ED_view3d_persp_ensure(const Depsgraph *depsgraph, View3D *v3d, ARegion *region);
1132
1133/* Camera view functions. */
1134
1139bool ED_view3d_camera_view_zoom_scale(RegionView3D *rv3d, const float scale);
1145bool ED_view3d_camera_view_pan(ARegion *region, const float event_ofs[2]);
1146
1147/* Camera lock functions */
1148
1152bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d);
1159void ED_view3d_camera_lock_init_ex(const Depsgraph *depsgraph,
1160 View3D *v3d,
1161 RegionView3D *rv3d,
1162 bool calc_dist);
1163void ED_view3d_camera_lock_init(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d);
1171bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d);
1172
1174 const Scene *scene, ID *id_key, bContext *C, bool do_rotate, bool do_translate);
1182 View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate);
1183
1184void ED_view3d_lock_clear(View3D *v3d);
1185
1190bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, bContext *C);
1191
1198bool ED_view3d_camera_lock_undo_push(const char *str,
1199 const View3D *v3d,
1200 const RegionView3D *rv3d,
1201 bContext *C);
1202
1210 const View3D *v3d,
1211 const RegionView3D *rv3d,
1212 bContext *C);
1213
1214#define VIEW3D_MARGIN 1.4f
1215#define VIEW3D_DIST_FALLBACK 1.0f
1216
1229float ED_view3d_offset_distance(const float mat[4][4], const float ofs[3], float fallback_dist);
1235void ED_view3d_distance_set(RegionView3D *rv3d, float dist);
1244 const float dist_co[3],
1245 float dist_min);
1246
1250float ED_scene_grid_scale(const Scene *scene, const char **r_grid_unit);
1251float ED_view3d_grid_scale(const Scene *scene, const View3D *v3d, const char **r_grid_unit);
1252void ED_view3d_grid_steps(const Scene *scene,
1253 const View3D *v3d,
1254 const RegionView3D *rv3d,
1255 float r_grid_steps[8]);
1261float ED_view3d_grid_view_scale(const Scene *scene,
1262 const View3D *v3d,
1263 const ARegion *region,
1264 const char **r_grid_unit);
1265
1270void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset);
1271
1272/* Render */
1273
1275void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area);
1276
1277#define SHADING_XRAY_ALPHA(shading) \
1278 (((shading).type == OB_WIRE) ? (shading).xray_alpha_wire : (shading).xray_alpha)
1279#define SHADING_XRAY_FLAG(shading) \
1280 (((shading).type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY)
1281#define SHADING_XRAY_FLAG_ENABLED(shading) (((shading).flag & SHADING_XRAY_FLAG(shading)) != 0)
1282#define SHADING_XRAY_ENABLED(shading) \
1283 (SHADING_XRAY_FLAG_ENABLED(shading) && (SHADING_XRAY_ALPHA(shading) < 1.0f))
1284#define SHADING_XRAY_ACTIVE(shading) \
1285 (SHADING_XRAY_ENABLED(shading) && ((shading).type < OB_MATERIAL))
1286
1287#define XRAY_ALPHA(v3d) SHADING_XRAY_ALPHA((v3d)->shading)
1288#define XRAY_FLAG(v3d) SHADING_XRAY_FLAG((v3d)->shading)
1289#define XRAY_FLAG_ENABLED(v3d) SHADING_XRAY_FLAG_ENABLED((v3d)->shading)
1297#define XRAY_ENABLED(v3d) SHADING_XRAY_ENABLED((v3d)->shading)
1298#define XRAY_ACTIVE(v3d) SHADING_XRAY_ACTIVE((v3d)->shading)
1299
1300#define OVERLAY_RETOPOLOGY_ENABLED(overlay) \
1301 (((overlay).edit_flag & V3D_OVERLAY_EDIT_RETOPOLOGY) != 0)
1302#ifdef __APPLE__
1303/* Apple silicon tile depth test requires a higher value to reduce drawing artifacts. */
1304# define OVERLAY_RETOPOLOGY_MIN_OFFSET 0.0015f
1305#else
1306# define OVERLAY_RETOPOLOGY_MIN_OFFSET FLT_EPSILON
1307#endif
1308
1309#define OVERLAY_RETOPOLOGY_OFFSET(overlay) \
1310 (OVERLAY_RETOPOLOGY_ENABLED(overlay) ? \
1311 max_ff((overlay).retopology_offset, OVERLAY_RETOPOLOGY_MIN_OFFSET) : \
1312 0.0f)
1313
1314#define RETOPOLOGY_ENABLED(v3d) (OVERLAY_RETOPOLOGY_ENABLED((v3d)->overlay))
1315#define RETOPOLOGY_OFFSET(v3d) (OVERLAY_RETOPOLOGY_OFFSET((v3d)->overlay))
1316
1317/* `view3d_gizmo_preselect_type.cc` */
1318
1320 const wmGizmo *gz,
1321 Base **r_base,
1322 BMElem **r_ele);
1324
1325/* `space_view3d.cc` */
1326
1328 ARegion *region,
1329 const char *category_override);
1330
1331/* `view3d_view.cc` */
1332
1345bool ED_localview_exit_if_empty(const Depsgraph *depsgraph,
1346 Scene *scene,
1347 ViewLayer *view_layer,
1348 wmWindowManager *wm,
1349 wmWindow *win,
1350 View3D *v3d,
1351 ScrArea *area,
1352 bool frame_selected = true,
1353 int smooth_viewtx = 0);
1358bool ED_view3d_local_collections_set(const Main *bmain, View3D *v3d);
1359void ED_view3d_local_collections_reset(const bContext *C, bool reset_all);
1360
1361#ifdef WITH_XR_OPENXR
1362void ED_view3d_xr_mirror_update(const ScrArea *area, const View3D *v3d, bool enable);
1363void ED_view3d_xr_shading_update(wmWindowManager *wm, const View3D *v3d, const Scene *scene);
1364bool ED_view3d_is_region_xr_mirror_active(const wmWindowManager *wm,
1365 const View3D *v3d,
1366 const ARegion *region);
1367#endif
unsigned char uchar
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
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])
void view3d_opengl_select_cache_begin()
void ED_view3d_cursor_snap_data_update(V3DSnapCursorState *state, const bContext *C, const ARegion *region, int x, int y)
void ED_view3d_check_mats_rv3d(RegionView3D *rv3d)
blender::float2 ED_view3d_project_float_v2_m4(const ARegion *region, const float co[3], const blender::float4x4 &mat)
V3DSnapCursorState * ED_view3d_cursor_snap_state_create()
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)
float ED_view3d_select_dist_px()
void ED_view3d_distance_set(RegionView3D *rv3d, float dist)
void ED_view3d_project_float_v3_m4(const ARegion *region, const float co[3], float r_co[3], const float mat[4][4])
void ED_view3d_local_collections_reset(const bContext *C, bool reset_all)
bool ED_view3d_depth_read_cached(const ViewDepths *vd, const int mval[2], int margin, float *r_depth)
bool ED_view3d_camera_to_view_selected_with_set_clipping(Main *bmain, Depsgraph *depsgraph, const Scene *scene, Object *camera_ob)
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_datamask(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, CustomData_MeshMasks *r_cddata_masks)
RV3DMatrixStore * ED_view3d_mats_rv3d_backup(RegionView3D *rv3d)
float ED_view3d_grid_scale(const Scene *scene, const View3D *v3d, const char **r_grid_unit)
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_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3])
void view3d_region_operator_needs_opengl(wmWindow *win, ARegion *region)
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 ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state)
void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const BoundBox *bb, bool is_flip)
RegionView3D * ED_view3d_context_rv3d(bContext *C)
float ED_view3d_grid_view_scale(const Scene *scene, const View3D *v3d, const ARegion *region, const char **r_grid_unit)
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)
char ED_view3d_axis_view_opposite(char view)
void ED_view3d_gizmo_mesh_preselect_get_active(const bContext *C, const wmGizmo *gz, Base **r_base, BMElem **r_ele)
bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d)
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)
void ED_view3d_clipping_calc(BoundBox *bb, float planes[4][4], const ARegion *region, const Object *ob, const rcti *rect)
eV3DProjTest
Definition ED_view3d.hh:265
@ V3D_PROJ_TEST_CLIP_FAR
Definition ED_view3d.hh:270
@ V3D_PROJ_TEST_CLIP_NEAR
Definition ED_view3d.hh:269
@ V3D_PROJ_TEST_CLIP_ZERO
Definition ED_view3d.hh:271
@ V3D_PROJ_TEST_CLIP_CONTENT
Definition ED_view3d.hh:292
@ V3D_PROJ_TEST_NOP
Definition ED_view3d.hh:266
@ V3D_PROJ_TEST_CLIP_WIN
Definition ED_view3d.hh:268
@ V3D_PROJ_TEST_CLIP_BB
Definition ED_view3d.hh:267
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
eV3DProjStatus ED_view3d_project_int_object(const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
bool ED_view3d_quat_to_axis_view(const float quat[4], float epsilon, char *r_view, char *r_view_axis_roll)
void ED_view3d_clear_mats_rv3d(RegionView3D *rv3d)
bool ED_view3d_distance_set_from_location(RegionView3D *rv3d, const float dist_co[3], float dist_min)
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)
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_autodist_last_clear(wmWindow *win)
V3DSnapCursorState * ED_view3d_cursor_snap_state_active_get()
float ED_view3d_pixel_size_no_ui_scale(const RegionView3D *rv3d, const float co[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_screen_datamask(const Scene *scene, ViewLayer *view_layer, const bScreen *screen, CustomData_MeshMasks *r_cddata_masks)
void ED_view3d_gizmo_mesh_preselect_clear(wmGizmo *gz)
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 ED_view3d_to_object(const Depsgraph *depsgraph, Object *ob, const float ofs[3], const float quat[4], float dist)
bool ED_view3d_context_user_region(bContext *C, View3D **r_v3d, ARegion **r_region)
bool ED_view3d_persp_ensure(const Depsgraph *depsgraph, View3D *v3d, ARegion *region)
bool ED_view3d_offset_lock_check(const View3D *v3d, const RegionView3D *rv3d)
bool ED_view3d_autodist_last_check(wmWindow *win, const wmEvent *event)
void ED_view3d_persp_switch_from_camera(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d, char persp)
bool ED_view3d_lock(RegionView3D *rv3d)
void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d)
char ED_view3d_lock_view_from_index(int index)
void ED_view3d_background_color_get(const Scene *scene, const View3D *v3d, float r_color[3])
void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], float dist)
float ED_view3d_calc_depth_for_comparison(const RegionView3D *rv3d, const float co[3])
void ED_view3d_stop_render_preview(wmWindowManager *wm, ARegion *region)
void ED_view3d_lastview_store(RegionView3D *rv3d)
float ED_view3d_pixel_size(const RegionView3D *rv3d, const float co[3])
eV3DProjStatus
Definition ED_view3d.hh:242
@ V3D_PROJ_RET_CLIP_WIN
Definition ED_view3d.hh:258
@ V3D_PROJ_RET_CLIP_BB
Definition ED_view3d.hh:256
@ V3D_PROJ_RET_CLIP_FAR
Definition ED_view3d.hh:247
@ V3D_PROJ_RET_CLIP_ZERO
Definition ED_view3d.hh:254
@ V3D_PROJ_RET_CLIP_NEAR
Definition ED_view3d.hh:245
@ V3D_PROJ_RET_OVERFLOW
Definition ED_view3d.hh:260
@ V3D_PROJ_RET_OK
Definition ED_view3d.hh:243
void ED_view3d_cursor_snap_state_prevpoint_set(V3DSnapCursorState *state, const float prev_point[3])
bool ED_view3d_clip_segment(const RegionView3D *rv3d, float ray_start[3], float ray_end[3])
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 ED_view3d_autodist_last_set(wmWindow *win, const wmEvent *event, const float ofs[3], const bool has_depth)
void ED_view3d_from_object(const Object *ob, float ofs[3], float quat[4], const float *dist, float *lens)
Object * ED_view3d_give_material_slot_under_cursor(bContext *C, const int mval[2], int *r_material_slot)
bool ED_view3d_camera_view_zoom_scale(RegionView3D *rv3d, const float scale)
void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2])
bool ED_view3d_autodist(ARegion *region, View3D *v3d, const int mval[2], float mouse_worldloc[3], const float fallback_depth_pt[3])
eV3DSnapCursor
Definition ED_view3d.hh:316
@ V3D_SNAPCURSOR_SNAP_EDIT_GEOM_FINAL
Definition ED_view3d.hh:320
@ V3D_SNAPCURSOR_OCCLUSION_ALWAYS_FALSE
Definition ED_view3d.hh:319
@ V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE
Definition ED_view3d.hh:317
@ V3D_SNAPCURSOR_OCCLUSION_ALWAYS_TRUE
Definition ED_view3d.hh:318
@ V3D_SNAPCURSOR_SNAP_EDIT_GEOM_CAGE
Definition ED_view3d.hh:321
Object * ED_view3d_give_object_under_cursor(bContext *C, const int mval[2])
bool ED_view3d_has_depth_buffer_updated(const Depsgraph *depsgraph, const View3D *v3d)
float ED_view3d_radius_to_dist_ortho(float lens, float radius)
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_select_id_validate(const ViewContext *vc)
bool ED_view3d_quat_from_axis_view(char view, char view_axis_roll, float r_quat[4])
float ED_view3d_offset_distance(const float mat[4][4], const float ofs[3], float fallback_dist)
void ED_view3d_from_m4(const float mat[4][4], float ofs[3], float quat[4], const float *dist)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
void lattice_foreachScreenVert(const ViewContext *vc, void(*func)(void *user_data, BPoint *bp, const float screen_co[2]), void *user_data, eV3DProjTest clip_flag)
int view3d_opengl_select(const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter)
void ED_view3d_dist_range_get(const View3D *v3d, float r_dist_range[2])
bool ED_view3d_autodist_last_get(wmWindow *win, float r_ofs[3])
eV3DProjStatus ED_view3d_project_short_global(const ARegion *region, const float co[3], short r_co[2], eV3DProjTest flag)
bool ED_view3d_snap_selected_to_location(bContext *C, wmOperator *op, const float snap_target_global[3], int pivot_point)
void ED_view3d_depth_override(Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obact, eV3DDepthOverrideMode mode, ViewDepths **r_depths)
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
void ED_view3d_navigation_free(bContext *C, ViewOpsData *vod)
float ED_view3d_radius_to_dist_persp(float angle, float radius)
bool ED_view3d_quat_to_axis_view_and_reset_quat(float quat[4], float epsilon, char *r_view, char *r_view_axis_roll)
eV3DProjStatus ED_view3d_project_short_object(const ARegion *region, const float co[3], short r_co[2], eV3DProjTest flag)
void ED_view3d_mats_rv3d_restore(RegionView3D *rv3d, RV3DMatrixStore *rv3dmat)
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)
void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4])
void ED_view3d_init_mats_rv3d_gl(const Object *ob, RegionView3D *rv3d)
int ED_view3d_backbuf_sample_size_clamp(ARegion *region, float dist)
float ED_view3d_radius_to_dist(const View3D *v3d, const ARegion *region, const Depsgraph *depsgraph, char persp, bool use_aspect, float radius)
blender::float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
bool ED_view3d_depth_read_cached_normal(const ARegion *region, const ViewDepths *depths, const int mval[2], float r_normal[3])
bool ED_view3d_clipping_clamp_minmax(const RegionView3D *rv3d, float min[3], float max[3])
bool ED_view3d_unproject_v3(const ARegion *region, float regionx, float regiony, float regionz, float world[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)
bool ED_view3d_context_activate(bContext *C)
void ED_view3d_lock_clear(View3D *v3d)
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)
bool ED_view3d_is_object_under_cursor(bContext *C, const int mval[2])
void view3d_operator_needs_opengl(const 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)
eV3DSelectObjectFilter ED_view3d_select_filter_from_mode(const Scene *scene, const Object *obact)
float ED_view3d_calc_zfac_ex(const RegionView3D *rv3d, const float co[3], bool *r_flip)
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)
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)
void ED_view3d_win_to_origin(const ARegion *region, const float mval[2], float r_out[3])
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 ED_view3d_camera_lock_init_ex(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d, bool calc_dist)
void ED_view3d_cursor3d_update(bContext *C, const int mval[2], bool use_depth, enum eV3DCursorOrient orientation)
bool ED_view3d_camera_view_pan(ARegion *region, const float event_ofs[2])
bool ED_view3d_camera_lock_undo_push(const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C)
float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3])
void ED_view3d_depths_free(ViewDepths *depths)
eV3DDepthOverrideMode
Definition ED_view3d.hh:184
@ V3D_DEPTH_SELECTED_ONLY
Definition ED_view3d.hh:194
@ V3D_DEPTH_NO_GPENCIL
Definition ED_view3d.hh:188
@ V3D_DEPTH_NO_OVERLAYS
Definition ED_view3d.hh:186
@ V3D_DEPTH_GPENCIL_ONLY
Definition ED_view3d.hh:190
@ V3D_DEPTH_OBJECT_ONLY
Definition ED_view3d.hh:192
eV3DCursorOrient
Definition ED_view3d.hh:90
@ V3D_CURSOR_ORIENT_XFORM
Definition ED_view3d.hh:93
@ V3D_CURSOR_ORIENT_GEOM
Definition ED_view3d.hh:94
@ V3D_CURSOR_ORIENT_VIEW
Definition ED_view3d.hh:92
@ V3D_CURSOR_ORIENT_NONE
Definition ED_view3d.hh:91
void ED_view3d_cursor_snap_state_free(V3DSnapCursorState *state)
void mball_foreachScreenElem(const ViewContext *vc, void(*func)(void *user_data, MetaElem *ml, const float screen_co[2]), void *user_data, eV3DProjTest clip_flag)
bool ED_view3d_navigation_do(bContext *C, ViewOpsData *vod, const wmEvent *event, const float depth_loc_override[3])
bool ED_view3d_autodist_simple(ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth)
void ED_view3d_cursor_snap_state_active_set(V3DSnapCursorState *state)
SnapObjectContext * ED_view3d_cursor_snap_context_ensure(Scene *scene)
ViewOpsData * ED_view3d_navigation_init(bContext *C, const wmKeyMapItem *kmi_merge)
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])
bool ED_view3d_camera_autokey(const Scene *scene, ID *id_key, bContext *C, bool do_rotate, bool do_translate)
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])
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_project_v3(const ARegion *region, const float world[3], float r_region_co[3])
eV3DProjStatus ED_view3d_project_base(const ARegion *region, Base *base, float r_co[2])
eV3DSelectMode
Definition ED_view3d.hh:914
@ VIEW3D_SELECT_PICK_ALL
Definition ED_view3d.hh:918
@ VIEW3D_SELECT_PICK_NEAREST
Definition ED_view3d.hh:920
@ VIEW3D_SELECT_ALL
Definition ED_view3d.hh:916
bool ED_view3d_camera_to_view_selected(Main *bmain, Depsgraph *depsgraph, const Scene *scene, Object *camera_ob)
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])
int view3d_opengl_select_with_id_filter(const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, uint select_id)
Base * ED_view3d_give_base_under_cursor(bContext *C, const int mval[2])
int view3d_opengl_select_ex(const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, bool do_material_slot_selection)
bool ED_view3d_local_collections_set(const Main *bmain, View3D *v3d)
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)
bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d)
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_polygon_offset(const RegionView3D *rv3d, float dist)
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_clipping_test(const RegionView3D *rv3d, const float co[3], bool is_local)
blender::float4x4 ED_view3d_ob_project_mat_get_from_obmat(const RegionView3D *rv3d, const blender::float4x4 &obmat)
Camera * ED_view3d_camera_data_get(View3D *v3d, RegionView3D *rv3d)
void ED_view3d_win_to_vector(const ARegion *region, const float mval[2], float r_out[3])
bool edge_inside_circle(const float cent[2], float radius, const float screen_co_a[2], const float screen_co_b[2])
void ED_view3d_grid_steps(const Scene *scene, const View3D *v3d, const RegionView3D *rv3d, float r_grid_steps[8])
RenderEngineType * ED_view3d_engine_type(const Scene *scene, int drawtype)
void ED_view3d_camera_lock_init(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d)
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_calc_render_border(const Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, rcti *r_rect)
void ED_view3d_viewcontext_init_object(ViewContext *vc, Object *obact)
void view3d_opengl_select_cache_end()
void ED_view3d_quadview_update(ScrArea *area, ARegion *region, bool do_clip)
bool ED_view3d_camera_lock_autokey(View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate)
void ED_view3d_buttons_region_layout_ex(const bContext *C, ARegion *region, const char *category_override)
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)
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)
V3DSnapCursorData * ED_view3d_cursor_snap_data_get()
eV3DSelectObjectFilter
Definition ED_view3d.hh:923
@ VIEW3D_SELECT_FILTER_NOP
Definition ED_view3d.hh:925
@ VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK
Definition ED_view3d.hh:927
@ VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK
Definition ED_view3d.hh:929
bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, bContext *C)
void ED_view3d_cursor3d_position(bContext *C, const int mval[2], bool use_depth, float r_cursor_co[3])
bool ED_view3d_depth_unproject_v3(const ARegion *region, const int mval[2], double depth, float r_location_world[3])
eV3DProjStatus ED_view3d_project_int_global(const ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
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 ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area)
bool ED_operator_rv3d_user_region_poll(bContext *C)
bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion **r_region)
void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset)
float ED_scene_grid_scale(const Scene *scene, const char **r_grid_unit)
bool ED_view3d_has_workbench_in_texture_color(const Scene *scene, const Object *ob, const View3D *v3d)
bool ED_view3d_camera_lock_undo_grouped_push(const char *str, const View3D *v3d, const RegionView3D *rv3d, bContext *C)
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void init()
ViewportColorSampleSession()=default
const Depsgraph * depsgraph
#define str(s)
static ulong state[N]
Frequency::GEOMETRY nor[]
#define min(a, b)
Definition sort.c:32
Definition DNA_ID.h:413
eSnapMode type_target
Definition ED_view3d.hh:327
eSnapMode type_source
Definition ED_view3d.hh:326
eV3DSnapCursor flag
Definition ED_view3d.hh:341
bool(* poll)(ARegion *region, void *custom_poll_data)
Definition ED_view3d.hh:351
float box_dimensions[3]
Definition ED_view3d.hh:346
uchar source_color[4]
Definition ED_view3d.hh:342
uchar target_color[4]
Definition ED_view3d.hh:343
RegionView3D * rv3d
Definition ED_view3d.hh:76
ARegion * region
Definition ED_view3d.hh:73
int mval[2]
Definition ED_view3d.hh:78
Scene * scene
Definition ED_view3d.hh:69
Main * bmain
Definition ED_view3d.hh:63
BMEditMesh * em
Definition ED_view3d.hh:77
wmWindow * win
Definition ED_view3d.hh:75
ViewLayer * view_layer
Definition ED_view3d.hh:70
bContext * C
Definition ED_view3d.hh:62
View3D * v3d
Definition ED_view3d.hh:74
Object * obact
Definition ED_view3d.hh:71
Object * obedit
Definition ED_view3d.hh:72
Depsgraph * depsgraph
Definition ED_view3d.hh:68
unsigned short w
Definition ED_view3d.hh:82
float * depths
Definition ED_view3d.hh:85
double depth_range[2]
Definition ED_view3d.hh:86
unsigned short h
Definition ED_view3d.hh:82
uint8_t flag
Definition wm_window.cc:138