149 prop =
RNA_def_int(
ot->
srna,
"mx", 0, 0, INT_MAX,
"Region Position X",
"", 0, INT_MAX);
151 prop =
RNA_def_int(
ot->
srna,
"my", 0, 0, INT_MAX,
"Region Position Y",
"", 0, INT_MAX);
155 RNA_def_int(
ot->
srna,
"delta", 0, INT_MIN, INT_MAX,
"Delta",
"", INT_MIN, INT_MAX);
160 ot->
srna,
"use_all_regions", 0,
"All Regions",
"View selected for all regions");
242 #define TRACKBALLSIZE (1.1f)
252 const float aspect[2] = {size_min /
size[0], size_min /
size[1]};
257 const float d =
len_v2(r_dir);
287 const float ofs_old[3],
288 const float viewquat_old[4],
289 const float viewquat_new[4],
290 const float dyn_ofs[3])
305 static float lastofs[3] = {0, 0, 0};
338 for (
int i = 0; i < 4; i++) {
351 float select_center[3];
354 for (base_eval =
FIRSTBASE(view_layer_eval); base_eval; base_eval = base_eval->
next) {
374 mul_v3_fl(select_center, 1.0f / (
float)tot);
442 float fallback_depth_pt[3];
515 upvec[0] = upvec[1] = 0;
516 upvec[2] = rv3d->
dist;
546 const int event_xy_offset[2] = {
561 if (rv3d->
persmat[2][1] < 0.0f) {
664 float viewquat_inv[4];
665 float zaxis[3] = {0, 0, 1};
669 bool is_axis_aligned =
false;
676 for (
x = -1;
x < 2;
x++) {
677 for (
y = -1;
y < 2;
y++) {
678 for (
z = -1;
z < 2;
z++) {
680 float zaxis_test[3] = {
x,
y,
z};
689 is_axis_aligned =
true;
700 float quat_roll[4], quat_final[4], quat_best[4], quat_snap[4];
701 float viewquat_align[4];
702 float viewquat_align_inv[4];
722 for (j = 0; j < 8; j++) {
724 float xaxis1[3] = {1, 0, 0};
725 float xaxis2[3] = {1, 0, 0};
726 float quat_final_inv[4];
740 if (
angle <= best_angle) {
763 if (is_axis_aligned) {
782 float axis[3],
q1[4], dvec[3], newvec[3];
786 const int event_xy_offset[2] = {
799 angle *=
U.view_rotate_sensitivity_trackball;
817 float quat_local_x[4], quat_global_z[4];
820 const float zvec_global[3] = {0.0f, 0.0f, 1.0f};
824 const float sensitivity =
U.view_rotate_sensitivity_turntable /
U.dpi_fac;
860 if (
dot_v3v3(xaxis, m_inv[0]) < 0) {
864 fac =
fabsf(fac - 0.5f) * 2;
914 bool use_autokey =
false;
922 switch (event->
val) {
1002 event_xy[0] = 2 *
event->x -
event->prevx;
1003 event_xy[1] = 2 *
event->y -
event->prevy;
1006 event_xy[0] =
event->prevx;
1007 event_xy[1] =
event->prevy;
1012 event_xy[0] =
event->prevx;
1013 event_xy[1] =
event->y;
1038 ot->
name =
"Rotate View";
1060 #ifdef WITH_INPUT_NDOF
1061 static bool ndof_has_translate(
const wmNDOFMotionData *ndof,
1068 static bool ndof_has_rotate(
const wmNDOFMotionData *ndof,
const RegionView3D *rv3d)
1076 static float view3d_ndof_pan_speed_calc_ex(
RegionView3D *rv3d,
const float depth_pt[3])
1087 static float view3d_ndof_pan_speed_calc_from_dist(
RegionView3D *rv3d,
const float dist)
1103 return view3d_ndof_pan_speed_calc_ex(rv3d, tvec);
1106 static float view3d_ndof_pan_speed_calc(
RegionView3D *rv3d)
1111 return view3d_ndof_pan_speed_calc_ex(rv3d, tvec);
1120 static void view3d_ndof_pan_zoom(
const struct wmNDOFMotionData *ndof,
1123 const bool has_translate,
1124 const bool has_zoom)
1130 if (has_translate ==
false && has_zoom ==
false) {
1134 WM_event_ndof_pan_get(ndof, pan_vec,
false);
1147 if (ndof->tvec[2]) {
1148 float zoom_distance = rv3d->
dist * ndof->dt * ndof->tvec[2];
1151 zoom_distance = -zoom_distance;
1154 rv3d->
dist += zoom_distance;
1161 if (has_translate) {
1166 if (has_translate) {
1167 const float speed = view3d_ndof_pan_speed_calc(rv3d);
1184 static void view3d_ndof_orbit(
const struct wmNDOFMotionData *ndof,
1188 const bool apply_dyn_ofs)
1207 float angle, quat[4];
1208 float xvec[3] = {1, 0, 0};
1211 WM_event_ndof_rotate_get(ndof,
rot);
1236 float angle = WM_event_ndof_to_axis_angle(ndof, axis);
1251 if (apply_dyn_ofs) {
1259 void view3d_ndof_fly(
const wmNDOFMotionData *ndof,
1262 const bool use_precision,
1263 const short protectflag,
1264 bool *r_has_translate,
1267 bool has_translate = ndof_has_translate(ndof, v3d, rv3d);
1268 bool has_rotate = ndof_has_rotate(ndof, rv3d);
1275 if (has_translate) {
1278 float speed = view3d_ndof_pan_speed_calc_from_dist(rv3d, 1.0f);
1279 float trans[3], trans_orig_y;
1281 if (use_precision) {
1285 WM_event_ndof_pan_get(ndof, trans,
false);
1287 trans_orig_y = trans[1];
1298 trans[2] = trans_orig_y;
1318 has_translate =
true;
1321 has_translate =
false;
1326 const float turn_sensitivity = 1.0f;
1330 float angle = turn_sensitivity * WM_event_ndof_to_axis_angle(ndof, axis);
1335 if (use_precision) {
1349 float view_horizon[3] = {1.0f, 0.0f, 0.0f};
1350 float view_direction[3] = {0.0f, 0.0f, -1.0f};
1376 *r_has_translate = has_translate;
1377 *r_has_rotate = has_rotate;
1396 char xform_flag = 0;
1398 const wmNDOFMotionData *ndof =
event->customdata;
1416 const bool has_rotation = ndof_has_rotate(ndof, rv3d);
1418 const bool has_translate = ndof_has_translate(ndof, v3d, rv3d) &&
1420 const bool has_zoom = (ndof->tvec[2] != 0.0f) && !rv3d->
is_persp;
1422 if (has_translate || has_zoom) {
1423 view3d_ndof_pan_zoom(ndof, vod->
area, vod->
region, has_translate, has_zoom);
1428 view3d_ndof_orbit(ndof, vod->
area, vod->
region, vod,
true);
1449 ot->
name =
"NDOF Orbit View";
1451 ot->
idname =
"VIEW3D_OT_ndof_orbit";
1477 char xform_flag = 0;
1479 const wmNDOFMotionData *ndof =
event->customdata;
1502 const bool has_translate = ndof_has_translate(ndof, v3d, rv3d);
1505 if (has_translate || has_zoom) {
1506 view3d_ndof_pan_zoom(ndof, vod->
area, vod->
region, has_translate,
true);
1516 const bool has_rotation = ndof_has_rotate(ndof, rv3d);
1517 bool has_translate, has_zoom;
1519 if (is_orbit_around_pivot) {
1521 has_translate = !
is_zero_v2(ndof->tvec) && ndof_has_translate(ndof, v3d, rv3d);
1522 has_zoom = (ndof->tvec[2] != 0.0f);
1526 has_translate = ndof_has_translate(ndof, v3d, rv3d);
1532 const float dist_backup = rv3d->
dist;
1533 if (!is_orbit_around_pivot) {
1536 view3d_ndof_orbit(ndof, vod->
area, vod->
region, vod, is_orbit_around_pivot);
1538 if (!is_orbit_around_pivot) {
1543 if (has_translate || has_zoom) {
1544 view3d_ndof_pan_zoom(ndof, vod->
area, vod->
region, has_translate, has_zoom);
1565 ot->
name =
"NDOF Orbit View with Zoom";
1566 ot->
description =
"Orbit and zoom the view using the 3D mouse";
1567 ot->
idname =
"VIEW3D_OT_ndof_orbit_zoom";
1570 ot->
invoke = ndof_orbit_zoom_invoke;
1592 const wmNDOFMotionData *ndof =
event->customdata;
1593 char xform_flag = 0;
1595 const bool has_translate = ndof_has_translate(ndof, v3d, rv3d);
1596 const bool has_zoom = (ndof->tvec[2] != 0.0f) && !rv3d->
is_persp;
1601 if (!(has_translate || has_zoom)) {
1611 if (has_translate || has_zoom) {
1612 view3d_ndof_pan_zoom(ndof,
area, region, has_translate, has_zoom);
1630 ot->
name =
"NDOF Pan View";
1654 const int ndof_flag =
U.ndof_flag;
1659 ret = ndof_orbit_zoom_invoke(
C, op, event);
1661 U.ndof_flag = ndof_flag;
1669 ot->
name =
"NDOF Transform View";
1670 ot->
description =
"Pan and rotate the view with the 3D mouse";
1769 bool use_autokey =
false;
1777 switch (event->
val) {
1930 const int zoom_xy[2])
1934 const float zoomfac_new =
clamp_f(
1938 if (zoom_xy !=
NULL) {
1940 rctf camera_frame_old;
1941 rctf camera_frame_new;
1943 const float pt_src[2] = {zoom_xy[0], zoom_xy[1]};
1963 rv3d->
camdx += delta_px[0] / (region->
winx * zoomfac_px);
1964 rv3d->
camdy += delta_px[1] / (region->
winy * zoomfac_px);
1981 const float dist_new = rv3d->
dist * dfac;
1983 if (zoom_xy !=
NULL) {
2006 rv3d->
dist = dist_new;
2012 rv3d->
dist = dist_new;
2018 const bool zoom_invert,
2019 const bool zoom_invert_force,
2020 const int xy_curr[2],
2021 const int xy_init[2],
2023 const float val_orig,
2024 double *r_timer_lastdraw)
2030 float time_step = (
float)(
time - *r_timer_lastdraw);
2034 fac = (
float)(xy_init[0] - xy_curr[0]);
2037 fac = (
float)(xy_init[1] - xy_curr[1]);
2042 if (zoom_invert != zoom_invert_force) {
2046 zfac = 1.0f + ((fac / 20.0f) * time_step);
2047 *r_timer_lastdraw =
time;
2052 const int ctr[2] = {
2056 float len_new = (5 *
U.dpi_fac) + ((
float)
len_v2v2_int(ctr, xy_curr) /
U.dpi_fac);
2057 float len_old = (5 *
U.dpi_fac) + ((
float)
len_v2v2_int(ctr, xy_init) /
U.dpi_fac);
2060 if (zoom_invert_force) {
2061 SWAP(
float, len_new, len_old);
2064 zfac = val_orig * (len_old /
max_ff(len_new, 1.0f)) / val;
2067 float len_new = 5 *
U.dpi_fac;
2068 float len_old = 5 *
U.dpi_fac;
2071 len_new += (winrct->
xmax - (xy_curr[0])) /
U.dpi_fac;
2072 len_old += (winrct->
xmax - (xy_init[0])) /
U.dpi_fac;
2075 len_new += (winrct->
ymax - (xy_curr[1])) /
U.dpi_fac;
2076 len_old += (winrct->
ymax - (xy_init[1])) /
U.dpi_fac;
2079 if (zoom_invert != zoom_invert_force) {
2080 SWAP(
float, len_new, len_old);
2083 zfac = val_orig * (2.0f * ((len_new /
max_ff(len_old, 1.0f)) - 1.0f) + 1.0f) / val;
2091 const bool zoom_invert,
2092 const bool zoom_invert_force,
2093 const int xy_curr[2],
2094 const int xy_init[2],
2095 const int xy_offset[2],
2097 const float val_orig,
2098 double *r_timer_lastdraw)
2100 const int xy_curr_offset[2] = {
2101 xy_curr[0] + xy_offset[0],
2102 xy_curr[1] + xy_offset[1],
2104 const int xy_init_offset[2] = {
2105 xy_init[0] + xy_offset[0],
2106 xy_init[1] + xy_offset[1],
2122 const bool zoom_invert,
2123 const bool zoom_to_pos)
2140 if (!
ELEM(zfac, 1.0f, 0.0f)) {
2157 const bool zoom_invert,
2158 const bool zoom_to_pos)
2161 float dist_range[2];
2177 const float zfac_min = dist_range[0] / vod->
rv3d->
dist;
2178 const float zfac_max = dist_range[1] / vod->
rv3d->
dist;
2179 CLAMP(zfac, zfac_min, zfac_max);
2199 const bool zoom_invert,
2200 const bool zoom_to_pos)
2215 bool use_autokey =
false;
2227 switch (event->
val) {
2282 float dist_range[2];
2298 v3d =
area->spacedata.first;
2305 const int *zoom_xy =
NULL;
2311 zoom_xy = zoom_xy_buf;
2317 const float step = 1.2f;
2323 if (rv3d->
dist < dist_range[1]) {
2329 const float step = 1.0f / 1.2f;
2334 if (rv3d->
dist > dist_range[0]) {
2502 const float orig_ofs[3],
2503 const float dvec[3],
2526 SWAP(
float, len1, len2);
2529 zfac = 1.0f + ((len1 - len2) * 0.01f * vod->
rv3d->
dist);
2549 bool use_autokey =
false;
2557 switch (event->
val) {
2622 v3d =
area->spacedata.first;
2772 const bool skip_camera,
2773 bool *r_only_center)
2776 *r_only_center =
false;
2778 if (skip_camera && (ob == v3d->
camera)) {
2784 *r_only_center =
true;
2794 const bool only_center,
2816 const int smooth_viewtx)
2843 if (
size < 0.0001f) {
2874 .camera_old = v3d->
camera,
2876 .dist = ok_dist ? &new_dist :
NULL,
2886 .dist = ok_dist ? &new_dist :
NULL,
2901 const int smooth_viewtx)
2905 for (region =
area->regionbase.first; region; region = region->
next) {
2934 bool changed =
false;
2952 bool only_center =
false;
2986 if (use_all_regions) {
3035 const bool is_face_map = ((is_gp_edit ==
false) && region->
gizmo_map &&
3038 bool ok =
false, ok_dist =
true;
3065 ob_eval = base_eval->
object;
3075 if (gps->editcurve !=
NULL) {
3076 for (
int i = 0; i < gps->editcurve->tot_curve_points; i++) {
3077 BezTriple *bezt = &gps->editcurve->curve_points[i].bezt;
3095 if ((ob_eval) && (ok)) {
3100 else if (is_face_map) {
3112 view_layer_eval, v3d, ob_eval->
type, ob_eval->
mode, ob_eval_iter) {
3132 for (base_eval =
FIRSTBASE(view_layer_eval); base_eval; base_eval = base_eval->
next) {
3134 bool only_center =
false;
3154 if (use_all_regions) {
3167 ot->
name =
"Frame Selected";
3169 ot->
idname =
"VIEW3D_OT_view_selected";
3207 ot->
name =
"View Lock Clear";
3209 ot->
idname =
"VIEW3D_OT_view_lock_clear";
3264 ot->
name =
"View Lock to Active";
3265 ot->
description =
"Lock the view to the active object/bone";
3266 ot->
idname =
"VIEW3D_OT_view_lock_to_active";
3309 ot->
name =
"Center View to Cursor";
3310 ot->
description =
"Center the view so that the cursor is in the middle of the view";
3311 ot->
idname =
"VIEW3D_OT_view_center_cursor";
3361 ot->
name =
"Center View to Mouse";
3362 ot->
description =
"Center the view to the Z-depth position under the mouse cursor";
3363 ot->
idname =
"VIEW3D_OT_view_center_pick";
3413 ot->
name =
"Frame Camera Bounds";
3414 ot->
description =
"Center the camera view, resizing the view to fit its bounds";
3415 ot->
idname =
"VIEW3D_OT_view_center_camera";
3445 ot->
name =
"View Lock Center";
3447 ot->
idname =
"VIEW3D_OT_view_center_lock";
3539 ot->
name =
"Set Render Region";
3540 ot->
description =
"Set the boundaries of the border render and enable border render";
3541 ot->
idname =
"VIEW3D_OT_render_border";
3599 ot->
name =
"Clear Render Region";
3600 ot->
description =
"Clear the boundaries of the border render and disable border render";
3601 ot->
idname =
"VIEW3D_OT_clear_render_border";
3626 float dvec[3], vb[2], xscale, yscale;
3627 float dist_range[2];
3634 float depth_close = FLT_MAX;
3635 float cent[2], p[3];
3665 const float region_aspect = (
float)region->
winx / (
float)region->
winy;
3681 if (depth_close == FLT_MAX) {
3704 vb[0] = region->
winx;
3705 vb[1] = region->
winy;
3707 new_dist = rv3d->
dist;
3710 if (depth_close != FLT_MAX &&
ED_view3d_unproject(region, cent[0], cent[1], depth_close, p)) {
3726 mval_f[0] = (rect.
xmin + rect.
xmax - vb[0]) / 2.0f;
3727 mval_f[1] = (rect.
ymin + rect.
ymax - vb[1]) / 2.0f;
3736 new_dist *=
max_ff(xscale, yscale);
3741 new_dist = rv3d->
dist * (rv3d->
dist / new_dist);
3746 CLAMP(new_dist, dist_range[0], dist_range[1]);
3774 ot->
name =
"Zoom to Border";
3775 ot->
description =
"Zoom in the view to the nearest object contained in the border";
3776 ot->
idname =
"VIEW3D_OT_zoom_border";
3837 ot->
name =
"Zoom Camera 1:1";
3838 ot->
description =
"Match the camera to 1:1 to the render output";
3839 ot->
idname =
"VIEW3D_OT_zoom_camera_1_to_1";
3856 {
RV3D_VIEW_LEFT,
"LEFT", ICON_TRIA_LEFT,
"Left",
"View from the left"},
3857 {
RV3D_VIEW_RIGHT,
"RIGHT", ICON_TRIA_RIGHT,
"Right",
"View from the right"},
3858 {
RV3D_VIEW_BOTTOM,
"BOTTOM", ICON_TRIA_DOWN,
"Bottom",
"View from the bottom"},
3859 {
RV3D_VIEW_TOP,
"TOP", ICON_TRIA_UP,
"Top",
"View from the top"},
3873 const float quat_[4],
3875 char view_axis_roll,
3877 const float *align_to_quat,
3878 const int smooth_viewtx)
3882 const short orig_persp = rv3d->
persp;
3886 if (align_to_quat) {
3892 if (align_to_quat ==
NULL) {
3906 rv3d->
persp = perspo;
3916 .camera_old = v3d->
camera,
3938 .camera_old = camera_eval,
3946 const float *dyn_ofs_pt =
NULL;
3952 dyn_ofs_pt = dyn_ofs;
3963 .dyn_ofs = dyn_ofs_pt,
3986 float align_quat_buf[4];
3987 float *align_quat =
NULL;
3992 if (obact !=
NULL) {
3997 align_quat = align_quat_buf;
4004 float quat_rotate[4];
4031 float angle_best = FLT_MAX;
4033 int view_axis_roll_best = -1;
4042 if (angle_best > angle_test) {
4043 angle_best = angle_test;
4045 view_axis_roll_best = j;
4049 if (view_best == -1) {
4062 viewnum = view_best;
4063 view_axis_roll = view_axis_roll_best;
4071 C, v3d, region, quat, viewnum, view_axis_roll, nextperspo, align_quat, smooth_viewtx);
4073 perspo = rv3d->
persp;
4085 ot->
idname =
"VIEW3D_OT_view_axis";
4097 ot->
srna,
"align_active", 0,
"Align Active",
"Align to the active object's axis");
4100 ot->
srna,
"relative", 0,
"Relative",
"Rotate relative to the current orientation");
4179 .dist = &rv3d->
dist,
4204 ot->
name =
"View Camera";
4206 ot->
idname =
"VIEW3D_OT_view_camera";
4232 {
V3D_VIEW_STEPLEFT,
"ORBITLEFT", 0,
"Orbit Left",
"Orbit the view around to the left"},
4233 {
V3D_VIEW_STEPRIGHT,
"ORBITRIGHT", 0,
"Orbit Right",
"Orbit the view around to the right"},
4304 rv3d->
view = view_opposite;
4312 float dyn_ofs[3], *dyn_ofs_pt =
NULL;
4317 dyn_ofs_pt = dyn_ofs;
4327 .dyn_ofs = dyn_ofs_pt,
4344 ot->
idname =
"VIEW3D_OT_view_orbit";
4354 prop =
RNA_def_float(
ot->
srna,
"angle", 0, -FLT_MAX, FLT_MAX,
"Roll",
"", -FLT_MAX, FLT_MAX);
4368 ARegion *region,
float quat[4],
const float orig_quat[4],
const float dvec[3],
float angle)
4389 float len1, len2, tot;
4394 angle = (len1 - len2) * (
float)
M_PI * 4.0f;
4397 if (
angle != 0.0f) {
4419 bool use_autokey =
false;
4427 switch (event->
val) {
4469 {0,
"ANGLE", 0,
"Roll Angle",
"Roll the view using an angle value"},
4470 {
V3D_VIEW_STEPLEFT,
"LEFT", 0,
"Roll Left",
"Roll the view around to the left"},
4510 const float *dyn_ofs_pt =
NULL;
4515 dyn_ofs_pt = dyn_ofs;
4525 .dyn_ofs = dyn_ofs_pt,
4585 ot->
idname =
"VIEW3D_OT_view_roll";
4599 ot->
srna,
"angle", 0, -FLT_MAX, FLT_MAX,
"Roll",
"", -FLT_MAX, FLT_MAX);
4605 "Roll Angle Source",
4606 "How roll angle is calculated");
4666 ot->
name =
"Pan View Direction";
4715 ot->
name =
"View Perspective/Orthographic";
4716 ot->
description =
"Switch the current view from perspective/orthographic projection";
4717 ot->
idname =
"VIEW3D_OT_view_persportho";
4757 ot->
name =
"View Navigation (Walk/Fly)";
4759 "Interactively navigate around the scene (uses the mode (walk/fly) preference)";
4825 ot->
name =
"Add Background Image";
4827 ot->
idname =
"VIEW3D_OT_background_image_add";
4881 ot->
name =
"Remove Background Image";
4882 ot->
description =
"Remove a background image from the 3D view";
4883 ot->
idname =
"VIEW3D_OT_background_image_remove";
4894 ot->
srna,
"index", 0, 0, INT_MAX,
"Index",
"Background image index to remove", 0, INT_MAX);
4907 const float mat[4][4])
4914 for (
int i = 0; i < 8; i++) {
4966 ot->
name =
"Clipping Region";
4968 ot->
idname =
"VIEW3D_OT_clip_border";
4995 const bool use_depth,
5002 bool depth_used =
false;
5028 if (depth_used ==
false) {
5037 const bool use_depth,
5040 float cursor_quat[4])
5059 cursor_quat[0] *= -1.0f;
5068 cursor_quat[0] *= -1.0f;
5070 const float mval_fl[2] = {
UNPACK2(mval)};
5085 .use_object_edit_cage =
false,
5086 .use_occlusion_test =
true,
5103 float z_src[3] = {0, 0, 1};
5111 const float ortho_axis_dot[3] = {
5118 float tquat_best[4];
5119 float angle_best = -1.0f;
5128 for (
int axis = 0; axis < 2; axis++) {
5129 float tan_src[3] = {0, 0, 0};
5130 tan_src[axis] = 1.0f;
5133 for (
int axis_sign = 0; axis_sign < 2; axis_sign++) {
5134 float tquat_test[4];
5137 if (angle_test < angle_best || angle_best == -1.0f) {
5138 angle_best = angle_test;
5144 mul_qt_qtqt(cursor_quat, tquat_best, cursor_quat);
5153 const bool use_depth,
5165 float quat[4], quat_prev[4];
5169 C, mval, use_depth, orientation, cursor_curr->
location, quat);
5173 float tmat[3][3], cmat[3][3];
5190 float co_2d_curr[2], co_2d_prev[2];
5246 ot->
name =
"Set 3D Cursor";
5266 "Orient to the current transform setting"},
5272 ot->
srna,
"use_depth",
true,
"Surface Project",
"Project onto the surface");
5280 "Preset viewpoint to use");
5291 {
OB_WIRE,
"WIREFRAME", 0,
"Wireframe",
"Toggle wireframe shading"},
5292 {
OB_SOLID,
"SOLID", 0,
"Solid",
"Toggle solid shading"},
5293 {
OB_MATERIAL,
"MATERIAL", 0,
"Material Preview",
"Toggle material preview shading"},
5294 {
OB_RENDER,
"RENDERED", 0,
"Rendered",
"Toggle rendered shading"},
5341 ot->
name =
"Toggle Shading Type";
5343 ot->
idname =
"VIEW3D_OT_toggle_shading";
5393 ot->
name =
"Toggle X-Ray";
5394 ot->
idname =
"VIEW3D_OT_toggle_xray";
5395 ot->
description =
"Transparent scene display. Allow selecting through items";
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_active(struct Object *ob)
bool BKE_pose_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select)
Camera data-block and utility functions.
struct CameraBGImage * BKE_camera_background_image_new(struct Camera *cam)
void BKE_camera_background_image_remove(struct Camera *cam, struct CameraBGImage *bgpic)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
bool BKE_gpencil_stroke_minmax(const struct bGPDstroke *gps, const bool use_select, float r_min[3], float r_max[3])
struct Object * BKE_view_layer_camera_find(struct ViewLayer *view_layer)
#define FOREACH_OBJECT_IN_MODE_END
#define FOREACH_OBJECT_IN_MODE_BEGIN(_view_layer, _v3d, _object_type, _object_mode, _instance)
void id_us_min(struct ID *id)
General operations, lookup, etc. for blender objects.
bool BKE_object_minmax_dupli(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
struct Object * BKE_object_pose_armature_get(struct Object *ob)
void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3])
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
bool BKE_object_empty_image_frame_is_visible_in_view3d(const struct Object *ob, const struct RegionView3D *rv3d)
bool BKE_paint_select_face_test(struct Object *ob)
void BKE_paint_stroke_get_average(struct Scene *scene, struct Object *ob, float stroke[3])
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_scene_cursor_mat3_to_rot(struct View3DCursor *cursor, const float mat[3][3], bool use_compat)
void BKE_scene_cursor_quat_to_rot(struct View3DCursor *cursor, const float quat[4], bool use_compat)
void BKE_scene_cursor_rot_to_quat(const struct View3DCursor *cursor, float quat[4])
float BKE_screen_view3d_zoom_from_fac(float zoomfac)
float BKE_screen_view3d_zoom_to_fac(float camzoom)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_fff(float a, float b, float c)
MINLINE float max_ff(float a, float b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE float min_ff(float a, float b)
MINLINE float square_f(float a)
MINLINE int axis_dominant_v3_ortho_single(const float vec[3])
float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3])
void mul_m3_v3(const float M[3][3], float r[3])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void mul_mat3_m4_v3(const float M[4][4], float r[3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
bool invert_m3_m3(float R[3][3], const float A[3][3])
bool is_negative_m4(const float mat[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3])
float angle_normalized_qt(const float q[4])
void invert_qt_normalized(float q[4])
void mat3_to_quat(float q[4], const float mat[3][3])
void axis_angle_to_quat(float r[4], const float axis[3], const float angle)
float normalize_qt(float q[4])
void mul_qt_v3(const float q[4], float r[3])
void axis_angle_normalized_to_quat(float r[4], const float axis[3], const float angle)
float normalize_qt_qt(float r[4], const float q[4])
void invert_qt_qt_normalized(float q1[4], const float q2[4])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void axis_angle_to_quat_single(float q[4], const char axis, const float angle)
void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
void copy_qt_qt(float q[4], const float a[4])
float angle_wrap_rad(float angle)
void quat_to_mat3(float mat[3][3], const float q[4])
float angle_signed_qtqt(const float q1[4], const float q2[4])
void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
float angle_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE bool equals_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
MINLINE float len_v2v2_int(const int v1[2], const int v2[2])
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
void project_plane_v3_v3v3(float out[3], const float p[3], const float v_plane[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
float angle_signed_on_axis_v3v3_v3(const float v1[3], const float v2[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3(float r[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE bool is_zero_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void add_v3_v3(float r[3], const float a[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void BLI_rctf_translate(struct rctf *rect, float x, float y)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rctf_transform_pt_v(const rctf *dst, const rctf *src, float xy_dst[2], const float xy_src[2])
void BLI_rcti_resize_y(struct rcti *rect, int y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
void BLI_rcti_resize_x(struct rcti *rect, int x)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define INIT_MINMAX(min, max)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_original_object(struct Object *object)
struct ViewLayer * DEG_get_evaluated_view_layer(const struct Depsgraph *graph)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
#define DEFAULT_SENSOR_WIDTH
#define GPENCIL_ANY_MODE(gpd)
#define OB_MODE_ALL_PAINT
Object is a sort of wrapper for general info.
#define BASE_SELECTED_EDITABLE(v3d, base)
#define SCE_SNAP_MODE_FACE
#define FIRSTBASE(_view_layer)
#define OBACT(_view_layer)
#define BASE_VISIBLE(v3d, base)
@ USER_LOCK_CURSOR_ADJUST
#define NDOF_PIXELS_PER_SECOND
#define RV3D_VIEW_IS_AXIS(view)
#define RV3D_CAMZOOM_MIN_FACTOR
@ V3D_AROUND_CENTER_MEDIAN
#define RV3D_LOCK_FLAGS(rv3d)
#define RV3D_CAMZOOM_MAX_FACTOR
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
#define V3D_RENDER_BORDER
@ RV3D_LOCK_ANY_TRANSFORM
@ RV3D_LOCK_ZOOM_AND_DOLLY
@ V3D_OVERLAY_BONE_SELECT
@ RV3D_VIEW_AXIS_ROLL_270
@ V3D_SHADING_XRAY_WIREFRAME
bool paintface_minmax(struct Object *ob, float r_min[3], float r_max[3])
int PE_minmax(struct Depsgraph *depsgraph, struct Scene *scene, struct ViewLayer *view_layer, float min[3], float max[3])
void ED_area_tag_redraw(ScrArea *area)
bScreen * ED_screen_animation_playing(const struct wmWindowManager *wm)
void ED_region_tag_redraw(struct ARegion *region)
bool ED_operator_camera(struct bContext *C)
bool ED_operator_view3d_active(struct bContext *C)
bool ED_operator_region_view3d_active(struct bContext *C)
SnapObjectContext * ED_transform_snap_object_context_create_view3d(struct Scene *scene, int flag, const struct ARegion *region, const struct View3D *v3d)
short ED_transform_snap_object_project_view3d_ex(struct SnapObjectContext *sctx, struct Depsgraph *depsgraph, const unsigned short snap_to, const struct SnapObjectParams *params, const float mval[2], const float prev_co[3], float *dist_px, float r_loc[3], float r_no[3], int *r_index, struct Object **r_ob, float r_obmat[4][4])
void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx)
void ED_view3d_depth_tag_update(struct RegionView3D *rv3d)
void ED_view3d_persp_switch_from_camera(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d, const char persp)
bool ED_view3d_camera_lock_sync(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d)
void ED_view3d_calc_camera_border(const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, struct rctf *r_viewborder, const bool no_shift)
float ED_view3d_radius_to_dist(const struct View3D *v3d, const struct ARegion *region, const struct Depsgraph *depsgraph, const char persp, const bool use_aspect, const float radius)
void ED_view3d_calc_camera_border_size(const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, float r_size[2])
bool ED_view3d_clipping_clamp_minmax(const struct RegionView3D *rv3d, float min[3], float max[3])
char ED_view3d_axis_view_opposite(char view)
void ED_view3d_win_to_3d_int(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const int mval[2], float r_out[3])
bool ED_view3d_camera_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d)
bool ED_operator_rv3d_user_region_poll(struct bContext *C)
bool ED_view3d_quat_to_axis_view(const float viewquat[4], const float epsilon, char *r_view, char *r_view_axis_rotation)
void ED_view3d_dist_range_get(const struct View3D *v3d, float r_dist_range[2])
void ED_view3d_win_to_delta(const struct ARegion *region, const float mval[2], float out[3], const float zfac)
bool ED_view3d_quat_from_axis_view(const char view, const char view_axis_roll, float r_quat[4])
bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d)
bool ED_view3d_persp_ensure(const struct Depsgraph *depsgraph, struct View3D *v3d, struct ARegion *region)
void ED_view3d_clipping_calc_from_boundbox(float clip[6][4], const struct BoundBox *clipbb, const bool is_flip)
void ED_view3d_from_object(const struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens)
bool ED_view3d_camera_lock_autokey(struct View3D *v3d, struct RegionView3D *rv3d, struct bContext *C, const bool do_rotate, const bool do_translate)
void ED_view3d_win_to_vector(const struct ARegion *region, const float mval[2], float out[3])
void ED_view3d_camera_lock_init_ex(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist)
void ED_view3d_distance_set(struct RegionView3D *rv3d, const float dist)
bool ED_view3d_autodist(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], const bool alphaoverride, const float fallback_depth_pt[3])
@ V3D_CURSOR_ORIENT_XFORM
void ED_view3d_depth_override(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, bool update_cache)
void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], const struct ARegion *region, const struct Object *ob, const struct rcti *rect)
void ED_view3d_lastview_store(struct RegionView3D *rv3d)
void ED_view3d_win_to_3d(const struct View3D *v3d, const struct ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
void ED_view3d_camera_lock_init(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d)
void view3d_operator_needs_opengl(const struct bContext *C)
struct RegionView3D * ED_view3d_context_rv3d(struct bContext *C)
bool ED_view3d_unproject(const struct ARegion *region, float regionx, float regiony, float regionz, float world[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag)
void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area)
bool ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_region)
void ED_view3d_lock_clear(struct View3D *v3d)
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3], bool *r_flip)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
Platform independent time functions.
StructRNA RNA_View3DCursor
#define WM_FILESEL_RELPATH
#define WM_FILESEL_FILEPATH
#define ND_RENDER_OPTIONS
#define ND_DRAW_RENDER_VIEWPORT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
IconTextureDrawCall border
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct wmGizmoMap * gizmo_map
struct ListBase bg_images
struct EditFont * editfont
struct wmTimer * smooth_timer
const struct ARegion * region
const struct View3D * v3d
struct Object * ob_center
struct ViewOpsData::@543 curr
struct ViewOpsData::@542 prev
struct ViewOpsData::@541 init
char is_direction_inverted
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
double PIL_check_seconds_timer(void)
__forceinline const avxi abs(const avxi &a)
void view3d_update_depths_rect(ARegion *region, ViewDepths *d, rcti *rect)
float view3d_depth_near(ViewDepths *d)
static void viewzoom_apply(ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_to_pos)
void ED_view3d_cursor3d_update(bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation)
void viewmove_modal_keymap(wmKeyConfig *keyconf)
static void view_zoom_to_window_xy_camera(Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, float dfac, const int zoom_xy[2])
static int toggle_xray_exec(bContext *C, wmOperator *op)
static void viewdolly_cancel(bContext *C, wmOperator *op)
void VIEW3D_OT_view_roll(wmOperatorType *ot)
static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
static void view3d_from_minmax_multi(bContext *C, View3D *v3d, const float min[3], const float max[3], const bool ok_dist, const int smooth_viewtx)
static int view3d_center_lock_exec(bContext *C, wmOperator *UNUSED(op))
static int view3d_clipping_invoke(bContext *C, wmOperator *op, const wmEvent *event)
struct ViewOpsData ViewOpsData
void VIEW3D_OT_view_axis(wmOperatorType *ot)
static int background_image_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int view_camera_exec(bContext *C, wmOperator *op)
static int view_axis_exec(bContext *C, wmOperator *op)
static void viewrotate_apply(ViewOpsData *vod, const int event_xy[2])
static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void viewrotate_cancel(bContext *C, wmOperator *op)
static int view3d_clipping_exec(bContext *C, wmOperator *op)
static int viewrotate_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void viewmove_cancel(bContext *C, wmOperator *op)
static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *region, const float min[3], const float max[3], bool ok_dist, const int smooth_viewtx)
void VIEW3D_OT_view_orbit(wmOperatorType *ot)
static int view3d_cursor3d_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_view3d_cursor3d_position_rotation(bContext *C, const int mval[2], const bool use_depth, enum eV3DCursorOrient orientation, float cursor_co[3], float cursor_quat[4])
static void viewroll_cancel(bContext *C, wmOperator *op)
void view3d_orbit_apply_dyn_ofs(float r_ofs[3], const float ofs_old[3], const float viewquat_old[4], const float viewquat_new[4], const float dyn_ofs[3])
static int background_image_remove_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_persportho(wmOperatorType *ot)
static int viewselected_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_shading_type_items[]
static Camera * background_image_camera_from_context(bContext *C)
@ VIEWOPS_FLAG_USE_MOUSE_INIT
@ VIEWOPS_FLAG_ORBIT_SELECT
@ VIEWOPS_FLAG_DEPTH_NAVIGATE
@ VIEWOPS_FLAG_PERSP_ENSURE
static void viewzoom_apply_3d(ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_to_pos)
static void viewrotate_apply_dyn_ofs(ViewOpsData *vod, const float viewquat_new[4])
static void view_dolly_to_vector_3d(ARegion *region, const float orig_ofs[3], const float dvec[3], float dfac)
static void viewops_data_create(bContext *C, wmOperator *op, const wmEvent *event, enum eViewOpsFlag viewops_flag)
static void axis_set_view(bContext *C, View3D *v3d, ARegion *region, const float quat_[4], char view, char view_axis_roll, int perspo, const float *align_to_quat, const int smooth_viewtx)
static bool view3d_camera_user_poll(bContext *C)
static int vieworbit_exec(bContext *C, wmOperator *op)
static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op))
static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op))
static const EnumPropertyItem prop_view_orbit_items[]
void VIEW3D_OT_toggle_xray(wmOperatorType *ot)
static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op))
static int viewmove_modal(bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_zoom_border(wmOperatorType *ot)
void VIEW3D_OT_rotate(wmOperatorType *ot)
void VIEW3D_OT_view_center_camera(wmOperatorType *ot)
static int viewzoom_modal(bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_view_center_lock(wmOperatorType *ot)
static void calctrackballvec(const rcti *rect, const int event_xy[2], float r_dir[3])
void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot)
static void viewmove_apply(ViewOpsData *vod, int x, int y)
void VIEW3D_OT_clip_border(wmOperatorType *ot)
static float viewzoom_scale_value(const rcti *winrct, const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_invert_force, const int xy_curr[2], const int xy_init[2], const float val, const float val_orig, double *r_timer_lastdraw)
static int view_lock_to_active_exec(bContext *C, wmOperator *UNUSED(op))
static bool view3d_object_skip_minmax(const View3D *v3d, const RegionView3D *rv3d, const Object *ob, const bool skip_camera, bool *r_only_center)
static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op))
static const EnumPropertyItem prop_view_roll_items[]
static void viewops_data_free(bContext *C, wmOperator *op)
static int toggle_shading_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_lock_to_active(wmOperatorType *ot)
static bool viewdolly_offset_lock_check(bContext *C, wmOperator *op)
static int viewpan_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void view3d_set_1_to_1_viewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region, View3D *v3d)
void VIEW3D_OT_view_pan(wmOperatorType *ot)
void VIEW3D_OT_cursor3d(wmOperatorType *ot)
static int viewzoom_exec(bContext *C, wmOperator *op)
@ V3D_OP_PROP_USE_MOUSE_INIT
@ V3D_OP_PROP_USE_ALL_REGIONS
void ED_view3d_clipping_local(RegionView3D *rv3d, const float mat[4][4])
static int viewdolly_modal(bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_clear_render_border(wmOperatorType *ot)
void VIEW3D_OT_background_image_add(wmOperatorType *ot)
static enum eViewOpsFlag viewops_flag_from_prefs(void)
static void view_roll_angle(ARegion *region, float quat[4], const float orig_quat[4], const float dvec[3], float angle)
void VIEW3D_OT_view_lock_clear(wmOperatorType *ot)
static bool view3d_zoom_or_dolly_poll(bContext *C)
static int view3d_all_exec(bContext *C, wmOperator *op)
static void view3d_object_calc_minmax(Depsgraph *depsgraph, Scene *scene, Object *ob_eval, const bool only_center, float min[3], float max[3])
static int viewmove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void viewops_data_alloc(bContext *C, wmOperator *op)
void VIEW3D_OT_view_all(wmOperatorType *ot)
static void viewzoom_cancel(bContext *C, wmOperator *op)
static void view3d_operator_properties_common(wmOperatorType *ot, const enum eV3D_OpPropFlag flag)
void viewzoom_modal_keymap(wmKeyConfig *keyconf)
static void viewzoom_apply_camera(ViewOpsData *vod, const int xy[2], const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_to_pos)
void VIEW3D_OT_navigate(wmOperatorType *ot)
static bool background_image_add_poll(bContext *C)
static void calc_local_clipping(float clip_local[6][4], const BoundBox *clipbb, const float mat[4][4])
static enum eViewOpsFlag viewops_flag_from_args(bool use_select, bool use_depth)
static int view_lock_clear_exec(bContext *C, wmOperator *UNUSED(op))
static int render_border_exec(bContext *C, wmOperator *op)
static int viewdolly_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_view_selected(wmOperatorType *ot)
static float viewzoom_scale_value_offset(const rcti *winrct, const eViewZoom_Style viewzoom, const bool zoom_invert, const bool zoom_invert_force, const int xy_curr[2], const int xy_init[2], const int xy_offset[2], const float val, const float val_orig, double *r_timer_lastdraw)
static const EnumPropertyItem prop_view_items[]
void viewrotate_modal_keymap(wmKeyConfig *keyconf)
void VIEW3D_OT_zoom(wmOperatorType *ot)
void ED_view3d_cursor3d_position(bContext *C, const int mval[2], const bool use_depth, float cursor_co[3])
@ VIEWROT_MODAL_SWITCH_ROTATE
@ VIEWROT_MODAL_AXIS_SNAP_ENABLE
@ VIEWROT_MODAL_SWITCH_MOVE
@ VIEWROT_MODAL_SWITCH_ZOOM
@ VIEWROT_MODAL_AXIS_SNAP_DISABLE
void VIEW3D_OT_view_camera(wmOperatorType *ot)
void viewdolly_modal_keymap(wmKeyConfig *keyconf)
static int clear_render_border_exec(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_view_center_pick(wmOperatorType *ot)
static void viewdolly_apply(ViewOpsData *vod, const int xy[2], const short zoom_invert)
void VIEW3D_OT_view_center_cursor(wmOperatorType *ot)
static const EnumPropertyItem prop_view_pan_items[]
static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
static int viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int viewcenter_cursor_exec(bContext *C, wmOperator *op)
static void viewroll_apply(ViewOpsData *vod, int x, int UNUSED(y))
static int viewroll_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int viewroll_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_render_border(wmOperatorType *ot)
static void viewrotate_apply_snap(ViewOpsData *vod)
static bool view3d_lock_poll(bContext *C)
void VIEW3D_OT_background_image_remove(wmOperatorType *ot)
void VIEW3D_OT_toggle_shading(wmOperatorType *ot)
void VIEW3D_OT_move(wmOperatorType *ot)
static int view3d_navigate_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
static int viewcenter_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void view_zoom_to_window_xy_3d(ARegion *region, float dfac, const int zoom_xy[2])
static int viewzoom_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void VIEW3D_OT_dolly(wmOperatorType *ot)
static bool view3d_pan_poll(bContext *C)
bool ED_view3d_minmax_verts(struct Object *obedit, float min[3], float max[3])
void ED_view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *region, const int smooth_viewtx, const V3D_SmoothParams *sview)
void ED_view3d_smooth_view_force_finish(struct bContext *C, struct View3D *v3d, struct ARegion *region)
void view3d_boxview_sync(struct ScrArea *area, struct ARegion *region)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
int WM_operator_name_call(bContext *C, const char *opstring, short context, PointerRNA *properties)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
bool WM_gizmomap_is_any_selected(const wmGizmoMap *gzmap)
bool WM_gizmomap_minmax(const wmGizmoMap *gzmap, bool UNUSED(use_hidden), bool use_select, float r_min[3], float r_max[3])
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
wmKeyMapItem * WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
void WM_msg_publish_rna_params(struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params)
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
void WM_operator_properties_border(wmOperatorType *ot)
void WM_operator_properties_use_cursor_init(wmOperatorType *ot)
void WM_operator_properties_gesture_box_zoom(wmOperatorType *ot)
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
int WM_operator_smooth_viewtx_get(const wmOperator *op)
ID * WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)