Blender V5.0
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
8
9#pragma once
10
11#include "BLI_bounds_types.hh"
14#include "BLI_utildefines.h"
15
16#include "DNA_scene_types.h"
17
18/* ********* exports for space_view3d/ module ********** */
19struct ARegion;
20struct BMEdge;
21struct BMElem;
22struct BMEditMesh;
23struct BMFace;
24struct BMVert;
25struct BPoint;
26struct Base;
27struct BezTriple;
28struct BoundBox;
29struct Camera;
31struct Depsgraph;
32struct EditBone;
33struct GPUSelectBuffer;
34struct ID;
35struct Main;
36struct MetaElem;
37struct Nurb;
38struct Object;
39struct RV3DMatrixStore;
40struct RegionView3D;
41struct RenderEngineType;
42struct Scene;
43struct ScrArea;
44struct View3D;
45struct ViewContext;
46struct ViewLayer;
47struct ViewOpsData;
48struct bContext;
49struct bGPDlayer;
50struct bPoseChannel;
51struct bScreen;
52struct rctf;
53struct rcti;
54struct wmEvent;
55struct wmGizmo;
56struct wmKeyMapItem;
57struct wmOperator;
58struct wmWindow;
59struct wmWindowManager;
60namespace blender::ed::transform {
62}
63
68 /* Dependency graph is uses for depth drawing, viewport camera matrix access, and also some areas
69 * are re-using this to access evaluated entities.
70 *
71 * Moral of the story: assign to a fully evaluated state. */
72 Depsgraph *depsgraph;
82 int mval[2];
83};
84
85struct ViewDepths {
86 unsigned short w, h;
87 /* only for temp use for sub-rectangles, added to `region->winx/winy`. */
88 short x, y;
89 float *depths;
90 double depth_range[2];
91};
92
93/* Rotate 3D cursor on placement. */
100
101void ED_view3d_background_color_get(const Scene *scene, const View3D *v3d, float r_color[3]);
102void ED_view3d_text_colors_get(const Scene *scene,
103 const View3D *v3d,
104 float r_text_color[4],
105 float r_shadow_color[4]);
107 const Object *ob,
108 const View3D *v3d);
115 const int mval[2],
116 bool use_depth,
117 float r_cursor_co[3]);
119 const int mval[2],
120 bool use_depth,
121 enum eV3DCursorOrient orientation,
122 float r_cursor_co[3],
123 float r_cursor_quat[4]);
125 const int mval[2],
126 bool use_depth,
127 enum eV3DCursorOrient orientation);
128
130
139void ED_view3d_to_m4(float mat[4][4], const float ofs[3], const float quat[4], float dist);
148void ED_view3d_from_m4(const float mat[4][4], float ofs[3], float quat[4], const float *dist);
149
159 const Object *ob, float ofs[3], float quat[4], const float *dist, float *lens);
170 const Depsgraph *depsgraph, Object *ob, const float ofs[3], const float quat[4], float dist);
171
173 Depsgraph *depsgraph,
174 const Scene *scene,
175 Object *camera_ob);
176
178 Depsgraph *depsgraph,
179 const Scene *scene,
180 Object *camera_ob);
181
186
187/* Depth buffer */
201
214void ED_view3d_depth_override(Depsgraph *depsgraph,
215 ARegion *region,
216 View3D *v3d,
217 Object *obact,
219 bool use_overlay,
220 ViewDepths **r_depths);
223 const int mval[2],
224 int margin,
225 float *r_depth);
227 const ViewDepths *depths,
228 const int mval[2],
229 float r_normal[3]);
230bool ED_view3d_depth_unproject_v3(const ARegion *region,
231 const int mval[2],
232 double depth,
233 float r_location_world[3]);
234
235bool ED_view3d_has_depth_buffer_updated(const Depsgraph *depsgraph, const View3D *v3d);
236
246 ViewOpsData *vod,
247 const wmEvent *event,
248 const float depth_loc_override[3]);
250
251/* Projection */
252#define IS_CLIPPED 12000
253
254/* return values for ED_view3d_project_...() */
276
277/* some clipping tests are optional */
308
309#define V3D_PROJ_TEST_CLIP_DEFAULT \
310 (V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR)
311#define V3D_PROJ_TEST_ALL \
312 (V3D_PROJ_TEST_CLIP_DEFAULT | V3D_PROJ_TEST_CLIP_FAR | V3D_PROJ_TEST_CLIP_ZERO | \
313 V3D_PROJ_TEST_CLIP_CONTENT)
314
315#define V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT \
316 (V3D_PROJ_TEST_CLIP_CONTENT | V3D_PROJ_TEST_CLIP_NEAR | V3D_PROJ_TEST_CLIP_FAR | \
317 V3D_PROJ_TEST_CLIP_WIN)
318
319/* `view3d_snap.cc` */
320
322 wmOperator *op,
323 const float target_loc_global[3],
324 int pivot_point);
325
326/* `view3d_cursor_snap.cc` */
327
328#define USE_SNAP_DETECT_FROM_KEYMAP_HACK
337
351
353 /* Setup. */
358 float *prevpoint;
363
364 bool (*poll)(ARegion *region, void *custom_poll_data);
366};
367
374 const float prev_point[3]);
376 const bContext *C,
377 const ARegion *region,
378 const blender::int2 &mval);
382 const float source_loc[3],
383 const float target_loc[3],
384 const eSnapMode source_type,
385 const eSnapMode target_type,
386 const uchar source_color[4],
387 const uchar target_color[4]);
388
389/* `view3d_iterators.cc` */
390
391/* foreach iterators */
392
394 void (*func)(void *user_data,
395 const float screen_co[2],
396 int index),
397 void *user_data,
398 eV3DProjTest clip_flag);
400 const ViewContext *vc,
401 void (*func)(void *user_data, BMVert *eve, const float screen_co[2], int index),
402 void *user_data,
403 eV3DProjTest clip_flag);
405 void (*func)(void *user_data,
406 BMEdge *eed,
407 const float screen_co_a[2],
408 const float screen_co_b[2],
409 int index),
410 void *user_data,
411 eV3DProjTest clip_flag);
412
418 void (*func)(void *user_data,
419 BMEdge *eed,
420 const float screen_co_a[2],
421 const float screen_co_b[2],
422 int index),
423 void *user_data,
424 eV3DProjTest clip_flag);
425
427 const ViewContext *vc,
428 void (*func)(void *user_data, BMFace *efa, const float screen_co[2], int index),
429 void *user_data,
430 eV3DProjTest clip_flag);
432 void (*func)(void *user_data,
433 Nurb *nu,
434 BPoint *bp,
435 BezTriple *bezt,
436 int beztindex,
437 bool handle_visible,
438 const float screen_co[2]),
439 void *user_data,
440 eV3DProjTest clip_flag);
445 void (*func)(void *user_data, MetaElem *ml, const float screen_co[2]),
446 void *user_data,
447 eV3DProjTest clip_flag);
449 void (*func)(void *user_data, BPoint *bp, const float screen_co[2]),
450 void *user_data,
451 eV3DProjTest clip_flag);
456 void (*func)(void *user_data,
457 EditBone *ebone,
458 const float screen_co_a[2],
459 const float screen_co_b[2]),
460 void *user_data,
461 eV3DProjTest clip_flag);
462
467 void (*func)(void *user_data,
468 bPoseChannel *pchan,
469 const float screen_co_a[2],
470 const float screen_co_b[2]),
471 void *user_data,
472 eV3DProjTest clip_flag);
473/* *** end iterators *** */
474
475/* `view3d_project.cc` */
476
481 const float co[3],
482 const blender::float4x4 &mat);
486void ED_view3d_project_float_v3_m4(const ARegion *region,
487 const float co[3],
488 float r_co[3],
489 const float mat[4][4]);
490
491eV3DProjStatus ED_view3d_project_base(const ARegion *region, Base *base, float r_co[2]);
492
493/* *** short *** */
495 float perspmat[4][4],
496 bool is_local,
497 const float co[3],
498 short r_co[2],
500/* --- short --- */
502 const float co[3],
503 short r_co[2],
505/* object space, use ED_view3d_init_mats_rv3d before calling */
507 const float co[3],
508 short r_co[2],
510
511/* *** int *** */
513 float perspmat[4][4],
514 bool is_local,
515 const float co[3],
516 int r_co[2],
518/* --- int --- */
520 const float co[3],
521 int r_co[2],
523/* object space, use ED_view3d_init_mats_rv3d before calling */
525 const float co[3],
526 int r_co[2],
528
529/* *** float *** */
531 float perspmat[4][4],
532 bool is_local,
533 const float co[3],
534 float r_co[2],
536/* --- float --- */
538 const float co[3],
539 float r_co[2],
545 const float co[3],
546 float r_co[2],
548
549float ED_view3d_pixel_size(const RegionView3D *rv3d, const float co[3]);
550float ED_view3d_pixel_size_no_ui_scale(const RegionView3D *rv3d, const float co[3]);
551
562float ED_view3d_calc_zfac_ex(const RegionView3D *rv3d, const float co[3], bool *r_flip);
564float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3]);
568float ED_view3d_calc_depth_for_comparison(const RegionView3D *rv3d, const float co[3]);
569
570bool ED_view3d_clip_segment(const RegionView3D *rv3d, float ray_start[3], float ray_end[3]);
585 const ARegion *region,
586 const View3D *v3d,
587 const float mval[2],
588 float r_ray_start[3],
589 float r_ray_normal[3],
590 bool do_clip_planes);
609 const ARegion *region,
610 const View3D *v3d,
611 const float mval[2],
612 const bool do_clip_planes,
613 float r_ray_co[3],
614 float r_ray_normal[3],
615 float r_ray_start[3],
616 float r_ray_end[3]);
628void ED_view3d_win_to_ray(const ARegion *region,
629 const float mval[2],
630 float r_ray_start[3],
631 float r_ray_normal[3]);
639void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3]);
647void ED_view3d_win_to_3d(const View3D *v3d,
648 const ARegion *region,
649 const float depth_pt[3],
650 const float mval[2],
651 float r_out[3]);
652void ED_view3d_win_to_3d_int(const View3D *v3d,
653 const ARegion *region,
654 const float depth_pt[3],
655 const int mval[2],
656 float r_out[3]);
670 const ARegion *region,
671 const float depth_pt[3],
672 const float mval[2],
673 float r_out[3]);
674bool ED_view3d_win_to_3d_on_plane(const ARegion *region,
675 const float plane[4],
676 const float mval[2],
677 bool do_clip,
678 float r_out[3]);
687 const float plane[4],
688 const float mval[2],
689 bool do_clip,
690 const float plane_fallback[4],
691 float r_out[3]);
693 const ARegion *region, const float plane[4], const int mval[2], bool do_clip, float r_out[3]);
711void ED_view3d_win_to_delta(const ARegion *region,
712 const float xy_delta[2],
713 float zfac,
714 float r_out[3],
715 bool precise = false);
726void ED_view3d_win_to_origin(const ARegion *region, const float mval[2], float r_out[3]);
740void ED_view3d_win_to_vector(const ARegion *region, const float mval[2], float r_out[3]);
755bool ED_view3d_win_to_segment_clipped(const Depsgraph *depsgraph,
756 const ARegion *region,
757 const View3D *v3d,
758 const float mval[2],
759 float r_ray_start[3],
760 float r_ray_end[3],
761 bool do_clip_planes);
764 const blender::float4x4 &obmat);
765
770void ED_view3d_project_v3(const ARegion *region, const float world[3], float r_region_co[3]);
771void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2]);
773 const ARegion *region, float regionx, float regiony, float regionz, float world[3]);
774
775/* end */
776
795blender::Bounds<float> ED_view3d_dist_soft_range_get(const View3D *v3d, bool use_persp_range);
796
807float ED_view3d_dist_soft_min_get(const View3D *v3d, bool use_persp_range);
808
812bool ED_view3d_clip_range_get(const Depsgraph *depsgraph,
813 const View3D *v3d,
814 const RegionView3D *rv3d,
815 bool use_ortho_factor,
816 float *r_clip_start,
817 float *r_clip_end);
818bool ED_view3d_viewplane_get(const Depsgraph *depsgraph,
819 const View3D *v3d,
820 const RegionView3D *rv3d,
821 int winx,
822 int winy,
823 rctf *r_viewplane,
824 float *r_clip_start,
825 float *r_clip_end,
826 float *r_pixsize);
827
831void ED_view3d_polygon_offset(const RegionView3D *rv3d, float dist);
832
833void ED_view3d_calc_camera_border(const Scene *scene,
834 const Depsgraph *depsgraph,
835 const ARegion *region,
836 const View3D *v3d,
837 const RegionView3D *rv3d,
838 bool no_shift,
839 rctf *r_viewborder);
841 Depsgraph *depsgraph,
842 const ARegion *region,
843 const View3D *v3d,
844 const RegionView3D *rv3d,
845 float r_size[2]);
847 const Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, rcti *r_rect);
848
849void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const BoundBox *bb, bool is_flip);
851 BoundBox *bb, float planes[4][4], const ARegion *region, const Object *ob, const rcti *rect);
864bool ED_view3d_clipping_clamp_minmax(const RegionView3D *rv3d, float min[3], float max[3]);
865
866void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4]);
876bool ED_view3d_clipping_test(const RegionView3D *rv3d, const float co[3], bool is_local);
877
878float ED_view3d_radius_to_dist_persp(float angle, float radius);
879float ED_view3d_radius_to_dist_ortho(float lens, float radius);
905float ED_view3d_radius_to_dist(const View3D *v3d,
906 const ARegion *region,
907 const Depsgraph *depsgraph,
908 char persp,
909 bool use_aspect,
910 float radius);
911
916int ED_view3d_backbuf_sample_size_clamp(ARegion *region, float dist);
917
919
921bool ED_view3d_autodist_last_check(wmWindow *win, const wmEvent *event);
926bool ED_view3d_autodist_last_get(wmWindow *win, float r_ofs[3]);
928 const wmEvent *event,
929 const float ofs[3],
930 const bool has_depth);
933
942bool ED_view3d_autodist(ARegion *region,
943 View3D *v3d,
944 const int mval[2],
945 float mouse_worldloc[3],
946 const float fallback_depth_pt[3]);
947
952 const int mval[2],
953 float mouse_worldloc[3],
954 int margin,
955 const float *force_depth);
957 const int mval_sta[2],
958 const int mval_end[2],
959 int margin,
960 float *r_depth);
961
966 blender::gpu::Texture *tex = nullptr;
967 blender::ushort4 *data = nullptr;
968 int tex_w, tex_h;
969 rcti valid_rect;
970
971 public:
974
975 bool init(ARegion *region);
976 bool sample(const int mval[2], float r_col[3]);
977};
978
980 /* all elements in the region, ignore depth */
982 /* pick also depth sorts (only for small regions!) */
984 /* sorts and only returns visible objects (only for small regions!) */
986};
987
996
998
1006
1010int view3d_gpu_select_ex(const ViewContext *vc,
1011 GPUSelectBuffer *buffer,
1012 const rcti *input,
1013 eV3DSelectMode select_mode,
1014 eV3DSelectObjectFilter select_filter,
1015 bool do_material_slot_selection);
1016int view3d_gpu_select(const ViewContext *vc,
1017 GPUSelectBuffer *buffer,
1018 const rcti *input,
1019 eV3DSelectMode select_mode,
1020 eV3DSelectObjectFilter select_filter);
1022 GPUSelectBuffer *buffer,
1023 const rcti *input,
1024 eV3DSelectMode select_mode,
1025 eV3DSelectObjectFilter select_filter,
1026 uint select_id);
1027
1028/* `view3d_select.cc` */
1029
1032
1055
1057bool edge_inside_circle(const float cent[2],
1058 float radius,
1059 const float screen_co_a[2],
1060 const float screen_co_b[2]);
1061
1070bool ED_view3d_context_user_region(bContext *C, View3D **r_v3d, ARegion **r_region);
1075bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion **r_region);
1077
1090void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d);
1091void ED_view3d_init_mats_rv3d_gl(const Object *ob, RegionView3D *rv3d);
1092#ifndef NDEBUG
1098#else
1099# define ED_view3d_clear_mats_rv3d(rv3d) (void)(rv3d)
1100# define ED_view3d_check_mats_rv3d(rv3d) (void)(rv3d)
1101#endif
1102
1106
1107RenderEngineType *ED_view3d_engine_type(const Scene *scene, int drawtype);
1108
1114 wmWindow *win,
1115 Depsgraph *depsgraph,
1116 Scene *scene,
1117 ARegion *region,
1118 View3D *v3d,
1119 const float viewmat[4][4],
1120 const float winmat[4][4],
1121 const rcti *rect);
1122
1126Base *ED_view3d_give_base_under_cursor(bContext *C, const int mval[2]);
1129 const int mval[2],
1130 int *r_material_slot);
1131bool ED_view3d_is_object_under_cursor(bContext *C, const int mval[2]);
1135void ED_view3d_quadview_update(ScrArea *area, ARegion *region, bool do_clip);
1139void ED_view3d_update_viewmat(const Depsgraph *depsgraph,
1140 const Scene *scene,
1141 View3D *v3d,
1142 ARegion *region,
1143 const float viewmat[4][4],
1144 const float winmat[4][4],
1145 const rcti *rect,
1146 bool offscreen);
1147bool ED_view3d_quat_from_axis_view(char view, char view_axis_roll, float r_quat[4]);
1148bool ED_view3d_quat_to_axis_view(const float quat[4],
1149 float epsilon,
1150 char *r_view,
1151 char *r_view_axis_roll);
1159 float epsilon,
1160 char *r_view,
1161 char *r_view_axis_roll);
1162
1163char ED_view3d_lock_view_from_index(int index);
1165bool ED_view3d_lock(RegionView3D *rv3d);
1166
1167void ED_view3d_datamask(const Scene *scene,
1168 ViewLayer *view_layer,
1169 const View3D *v3d,
1170 CustomData_MeshMasks *r_cddata_masks);
1174void ED_view3d_screen_datamask(const Scene *scene,
1175 ViewLayer *view_layer,
1176 const bScreen *screen,
1177 CustomData_MeshMasks *r_cddata_masks);
1178
1179bool ED_view3d_offset_lock_check(const View3D *v3d, const RegionView3D *rv3d);
1187void ED_view3d_persp_switch_from_camera(const Depsgraph *depsgraph,
1188 View3D *v3d,
1189 RegionView3D *rv3d,
1190 char persp);
1197bool ED_view3d_persp_ensure(const Depsgraph *depsgraph, View3D *v3d, ARegion *region);
1198
1199/* Camera view functions. */
1200
1205bool ED_view3d_camera_view_zoom_scale(RegionView3D *rv3d, const float scale);
1211bool ED_view3d_camera_view_pan(ARegion *region, const float event_ofs[2]);
1212
1213/* Camera lock functions */
1214
1218bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d);
1225void ED_view3d_camera_lock_init_ex(const Depsgraph *depsgraph,
1226 View3D *v3d,
1227 RegionView3D *rv3d,
1228 bool calc_dist);
1229void ED_view3d_camera_lock_init(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d);
1237bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d);
1238
1240 const Scene *scene, ID *id_key, bContext *C, bool do_rotate, bool do_translate);
1248 View3D *v3d, RegionView3D *rv3d, bContext *C, bool do_rotate, bool do_translate);
1249
1250void ED_view3d_lock_clear(View3D *v3d);
1251
1256bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, bContext *C);
1257
1264bool ED_view3d_camera_lock_undo_push(const char *str,
1265 const View3D *v3d,
1266 const RegionView3D *rv3d,
1267 bContext *C);
1268
1276 const View3D *v3d,
1277 const RegionView3D *rv3d,
1278 bContext *C);
1279
1280#define VIEW3D_MARGIN 1.4f
1281#define VIEW3D_DIST_FALLBACK 1.0f
1282
1295float ED_view3d_offset_distance(const float mat[4][4], const float ofs[3], float fallback_dist);
1301void ED_view3d_distance_set(RegionView3D *rv3d, float dist);
1310 const float dist_co[3],
1311 float dist_min);
1312
1316float ED_scene_grid_scale(const Scene *scene, const char **r_grid_unit);
1317float ED_view3d_grid_scale(const Scene *scene, const View3D *v3d, const char **r_grid_unit);
1318void ED_view3d_grid_steps(const Scene *scene,
1319 const View3D *v3d,
1320 const RegionView3D *rv3d,
1321 float r_grid_steps[8]);
1327float ED_view3d_grid_view_scale(const Scene *scene,
1328 const View3D *v3d,
1329 const ARegion *region,
1330 const char **r_grid_unit);
1331
1336void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset);
1337
1338/* Render */
1339
1341void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area);
1342
1343#define SHADING_XRAY_ALPHA(shading) \
1344 (((shading).type == OB_WIRE) ? (shading).xray_alpha_wire : (shading).xray_alpha)
1345#define SHADING_XRAY_FLAG(shading) \
1346 (((shading).type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY)
1347#define SHADING_XRAY_FLAG_ENABLED(shading) (((shading).flag & SHADING_XRAY_FLAG(shading)) != 0)
1348#define SHADING_XRAY_ENABLED(shading) \
1349 (SHADING_XRAY_FLAG_ENABLED(shading) && (SHADING_XRAY_ALPHA(shading) < 1.0f))
1350#define SHADING_XRAY_ACTIVE(shading) \
1351 (SHADING_XRAY_ENABLED(shading) && ((shading).type < OB_MATERIAL))
1352
1353#define XRAY_ALPHA(v3d) SHADING_XRAY_ALPHA((v3d)->shading)
1354#define XRAY_FLAG(v3d) SHADING_XRAY_FLAG((v3d)->shading)
1355#define XRAY_FLAG_ENABLED(v3d) SHADING_XRAY_FLAG_ENABLED((v3d)->shading)
1363#define XRAY_ENABLED(v3d) SHADING_XRAY_ENABLED((v3d)->shading)
1364#define XRAY_ACTIVE(v3d) SHADING_XRAY_ACTIVE((v3d)->shading)
1365
1366#define OVERLAY_RETOPOLOGY_ENABLED(overlay) \
1367 (((overlay).edit_flag & V3D_OVERLAY_EDIT_RETOPOLOGY) != 0)
1368#ifdef __APPLE__
1369/* Apple silicon tile depth test requires a higher value to reduce drawing artifacts. */
1370# define OVERLAY_RETOPOLOGY_MIN_OFFSET 0.0015f
1371#else
1372# define OVERLAY_RETOPOLOGY_MIN_OFFSET FLT_EPSILON
1373#endif
1374
1375#define OVERLAY_RETOPOLOGY_OFFSET(overlay) \
1376 (OVERLAY_RETOPOLOGY_ENABLED(overlay) ? \
1377 max_ff((overlay).retopology_offset, OVERLAY_RETOPOLOGY_MIN_OFFSET) : \
1378 0.0f)
1379
1380#define RETOPOLOGY_ENABLED(v3d) (OVERLAY_RETOPOLOGY_ENABLED((v3d)->overlay))
1381#define RETOPOLOGY_OFFSET(v3d) (OVERLAY_RETOPOLOGY_OFFSET((v3d)->overlay))
1382
1383/* `view3d_gizmo_preselect_type.cc` */
1384
1386 const wmGizmo *gz,
1387 Base **r_base,
1388 BMElem **r_ele);
1390
1391/* view3d_gizmo_ruler.cc */
1392
1397
1398/* `space_view3d.cc` */
1399
1401 ARegion *region,
1402 const char *category_override);
1403
1404/* `view3d_view.cc` */
1405
1418bool ED_localview_exit_if_empty(const Depsgraph *depsgraph,
1419 Scene *scene,
1420 ViewLayer *view_layer,
1421 wmWindowManager *wm,
1422 wmWindow *win,
1423 View3D *v3d,
1424 ScrArea *area,
1425 bool frame_selected = true,
1426 int smooth_viewtx = 0);
1431bool ED_view3d_local_collections_set(const Main *bmain, View3D *v3d);
1432void ED_view3d_local_collections_reset(const bContext *C, bool reset_all);
1433
1434#ifdef WITH_XR_OPENXR
1435void ED_view3d_xr_mirror_update(const ScrArea *area, const View3D *v3d, bool enable);
1436void ED_view3d_xr_shading_update(wmWindowManager *wm, const View3D *v3d, const Scene *scene);
1437bool ED_view3d_is_region_xr_mirror_active(const wmWindowManager *wm,
1438 const View3D *v3d,
1439 const ARegion *region);
1440#endif
unsigned char uchar
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
bool ED_view3d_snap_selected_to_location(bContext *C, wmOperator *op, const float target_loc_global[3], int pivot_point)
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 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 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)
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3], bool precise=false)
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)
int view3d_gpu_select(const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter)
eV3DProjTest
Definition ED_view3d.hh:278
@ V3D_PROJ_TEST_CLIP_FAR
Definition ED_view3d.hh:283
@ V3D_PROJ_TEST_CLIP_NEAR
Definition ED_view3d.hh:282
@ V3D_PROJ_TEST_CLIP_ZERO
Definition ED_view3d.hh:284
@ V3D_PROJ_TEST_CLIP_CONTENT
Definition ED_view3d.hh:305
@ V3D_PROJ_TEST_NOP
Definition ED_view3d.hh:279
@ V3D_PROJ_TEST_CLIP_WIN
Definition ED_view3d.hh:281
@ V3D_PROJ_TEST_CLIP_BB
Definition ED_view3d.hh:280
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void ED_view3d_depth_override(Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obact, eV3DDepthOverrideMode mode, bool use_overlay, ViewDepths **r_depths)
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()
blender::Bounds< float > ED_view3d_dist_soft_range_get(const View3D *v3d, bool use_persp_range)
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)
void view3d_gpu_select_cache_end()
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])
int view3d_gpu_select_ex(const ViewContext *vc, GPUSelectBuffer *buffer, const rcti *input, eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter, bool do_material_slot_selection)
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:255
@ V3D_PROJ_RET_CLIP_WIN
Definition ED_view3d.hh:271
@ V3D_PROJ_RET_CLIP_BB
Definition ED_view3d.hh:269
@ V3D_PROJ_RET_CLIP_FAR
Definition ED_view3d.hh:260
@ V3D_PROJ_RET_CLIP_ZERO
Definition ED_view3d.hh:267
@ V3D_PROJ_RET_CLIP_NEAR
Definition ED_view3d.hh:258
@ V3D_PROJ_RET_OVERFLOW
Definition ED_view3d.hh:273
@ V3D_PROJ_RET_OK
Definition ED_view3d.hh:256
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:329
@ V3D_SNAPCURSOR_SNAP_EDIT_GEOM_FINAL
Definition ED_view3d.hh:333
@ V3D_SNAPCURSOR_OCCLUSION_ALWAYS_FALSE
Definition ED_view3d.hh:332
@ V3D_SNAPCURSOR_TOGGLE_ALWAYS_TRUE
Definition ED_view3d.hh:330
@ V3D_SNAPCURSOR_OCCLUSION_ALWAYS_TRUE
Definition ED_view3d.hh:331
@ V3D_SNAPCURSOR_SNAP_EDIT_GEOM_CAGE
Definition ED_view3d.hh:334
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)
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)
void ED_view3d_navigation_free(bContext *C, ViewOpsData *vod)
void view3d_region_operator_needs_gpu(ARegion *region)
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)
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_radius_to_dist(const View3D *v3d, const ARegion *region, const Depsgraph *depsgraph, char persp, bool use_aspect, float radius)
void ED_view3D_mats_rv3d_free(RV3DMatrixStore *rv3d_mat)
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_gizmo_ruler_remove_by_gpencil_layer(struct bContext *C, bGPDlayer *gpl)
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 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)
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])
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:188
@ V3D_DEPTH_ALL
Definition ED_view3d.hh:190
@ V3D_DEPTH_SELECTED_ONLY
Definition ED_view3d.hh:198
@ V3D_DEPTH_NO_GPENCIL
Definition ED_view3d.hh:192
@ V3D_DEPTH_GPENCIL_ONLY
Definition ED_view3d.hh:194
@ V3D_DEPTH_OBJECT_ONLY
Definition ED_view3d.hh:196
eV3DCursorOrient
Definition ED_view3d.hh:94
@ V3D_CURSOR_ORIENT_XFORM
Definition ED_view3d.hh:97
@ V3D_CURSOR_ORIENT_GEOM
Definition ED_view3d.hh:98
@ V3D_CURSOR_ORIENT_VIEW
Definition ED_view3d.hh:96
@ V3D_CURSOR_ORIENT_NONE
Definition ED_view3d.hh:95
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)
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 view3d_gpu_select_cache_begin()
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:979
@ VIEW3D_SELECT_PICK_ALL
Definition ED_view3d.hh:983
@ VIEW3D_SELECT_PICK_NEAREST
Definition ED_view3d.hh:985
@ VIEW3D_SELECT_ALL
Definition ED_view3d.hh:981
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])
Base * ED_view3d_give_base_under_cursor(bContext *C, const int mval[2])
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])
void view3d_operator_needs_gpu(const bContext *C)
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 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:988
@ VIEW3D_SELECT_FILTER_NOP
Definition ED_view3d.hh:990
@ VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK
Definition ED_view3d.hh:992
@ VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK
Definition ED_view3d.hh:994
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])
void ED_view3d_cursor_snap_data_update(V3DSnapCursorState *state, const bContext *C, const ARegion *region, const blender::int2 &mval)
bool ED_view3d_depth_unproject_v3(const ARegion *region, const int mval[2], double depth, float r_location_world[3])
float ED_view3d_dist_soft_min_get(const View3D *v3d, bool use_persp_range)
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)
blender::ed::transform::SnapObjectContext * ED_view3d_cursor_snap_context_ensure(Scene *scene)
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
static AppView * view
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
Definition IK_Math.h:117
#define C
Definition RandGen.cpp:29
BPy_StructRNA * depsgraph
void init()
ViewportColorSampleSession()=default
#define str(s)
#define input
static ulong state[N]
MatBase< float, 4, 4 > float4x4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
blender::VecBase< uint16_t, 4 > ushort4
#define min(a, b)
Definition sort.cc:36
Definition DNA_ID.h:414
eSnapMode type_target
Definition ED_view3d.hh:340
eSnapMode type_source
Definition ED_view3d.hh:339
float plane_omat[3][3]
Definition ED_view3d.hh:345
float obmat[4][4]
Definition ED_view3d.hh:343
eV3DSnapCursor flag
Definition ED_view3d.hh:354
bool(* poll)(ARegion *region, void *custom_poll_data)
Definition ED_view3d.hh:364
float box_dimensions[3]
Definition ED_view3d.hh:359
uchar source_color[4]
Definition ED_view3d.hh:355
uchar target_color[4]
Definition ED_view3d.hh:356
RegionView3D * rv3d
Definition ED_view3d.hh:80
ARegion * region
Definition ED_view3d.hh:77
int mval[2]
Definition ED_view3d.hh:82
Scene * scene
Definition ED_view3d.hh:73
Main * bmain
Definition ED_view3d.hh:67
BMEditMesh * em
Definition ED_view3d.hh:81
wmWindow * win
Definition ED_view3d.hh:79
ViewLayer * view_layer
Definition ED_view3d.hh:74
bContext * C
Definition ED_view3d.hh:66
View3D * v3d
Definition ED_view3d.hh:78
Object * obact
Definition ED_view3d.hh:75
Object * obedit
Definition ED_view3d.hh:76
Depsgraph * depsgraph
Definition ED_view3d.hh:72
unsigned short w
Definition ED_view3d.hh:86
float * depths
Definition ED_view3d.hh:89
double depth_range[2]
Definition ED_view3d.hh:90
unsigned short h
Definition ED_view3d.hh:86
max
Definition text_draw.cc:251
uint8_t flag
Definition wm_window.cc:145