11#include <fmt/format.h>
85#include "RNA_prototypes.hh"
100#define KM_MODAL_CANCEL 1
101#define KM_MODAL_APPLY 2
102#define KM_MODAL_SNAP_ON 3
103#define KM_MODAL_SNAP_OFF 4
177 if (
G.is_rendering) {
195 if (screen ==
nullptr) {
234 if (scene ==
nullptr) {
314 if (region ==
nullptr) {
318 if (gzmap ==
nullptr) {
374 if (ob && ob == obedit) {
559 return (ob !=
nullptr);
607 return (obact !=
nullptr);
695 return nullptr != (id_cast<bArmature *>(obedit->
data))->edbo;
761 if (obpose !=
nullptr) {
820 return nullptr != (id_cast<Curve *>(obedit->
data))->editnurb;
839 return nullptr != (id_cast<Curve *>(obedit->
data))->editnurb;
848 Curve *cu = id_cast<Curve *>(obedit->
data);
859 return nullptr != (id_cast<Curve *>(obedit->
data))->editnurb;
868 if ((id_cast<Curve *>(obedit->
data))->editfont) {
880 return nullptr != (id_cast<Lattice *>(obedit->
data))->editlatt;
889 return nullptr != (id_cast<MetaBall *>(obedit->
data))->editelems;
996 rcti *rect,
const short ,
const short ,
const short x2,
const short y2)
1004 *r_rect_clip = az->
rect;
1074 AZone *az =
nullptr;
1124 if (mouse_sq < spot_sq) {
1127 else if (mouse_sq < fadein_sq) {
1130 else if (mouse_sq < fadeout_sq) {
1131 az->
alpha = 1.0f -
float(mouse_sq - fadein_sq) /
float(fadeout_sq - fadein_sq);
1150 int scroll_flag = 0;
1159 else if (test_only) {
1160 if (isect_value != 0) {
1165 bool redraw =
false;
1167 if (isect_value ==
'h') {
1174 else if (isect_value ==
'v') {
1183 float dist_fac = 0.0f, alpha = 0.0f;
1187 CLAMP(dist_fac, 0.0f, 1.0f);
1188 alpha = 1.0f - dist_fac;
1194 CLAMP(dist_fac, 0.0f, 1.0f);
1195 alpha = 1.0f - dist_fac;
1210 else if (!test_only && !
IS_EQF(az->
alpha, 0.0f)) {
1243 if (az !=
nullptr) {
1308 event.customdata_free =
true;
1330 sad->
x =
event->xy[0];
1331 sad->
y =
event->xy[1];
1358 switch (event->
type) {
1360 const int delta_x = (
event->xy[0] - sad->
x);
1361 const int delta_y = (
event->xy[1] - sad->
y);
1364 const int delta_max =
max_ii(
abs(delta_x),
abs(delta_y));
1367 const int join_threshold = (0.6 *
U.widget_unit);
1368 const int split_threshold = (1.2 *
U.widget_unit);
1369 const int area_threshold = (0.1 *
U.widget_unit);
1372 if (delta_y >
abs(delta_x)) {
1375 else if (delta_x >=
abs(delta_y)) {
1378 else if (delta_y < -
abs(delta_x)) {
1405 is_gesture = (delta_max > area_threshold);
1412 else if (area == sad->
sa1) {
1417 is_gesture = (delta_max > split_threshold);
1419 else if (!area || area->
global) {
1439 is_gesture = (delta_max > join_threshold);
1443#if defined(__APPLE__)
1453 is_gesture = (delta_max > area_threshold);
1490 ot->
name =
"Handle Area Action Zones";
1491 ot->
description =
"Handle area action zones for mouse actions/gestures";
1492 ot->
idname =
"SCREEN_OT_actionzone";
1502 RNA_def_int(ot->
srna,
"modifier", 0, 0, 2,
"Modifier",
"Modifier state", 0, 2);
1512 const int cursor[2],
1524 if (actedge ==
nullptr) {
1584 if (sad ==
nullptr || sad->
sa1 ==
nullptr) {
1628 switch (event->
type) {
1634 status.
item(
IFACE_(
"Select Area"), ICON_MOUSE_LMB);
1635 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
1640 if (!sad->
sa2 || sad->
sa1 == sad->
sa2) {
1674 if (sa1 ==
nullptr || sa2 ==
nullptr) {
1683 ot->
name =
"Swap Areas";
1684 ot->
description =
"Swap selected areas screen positions";
1685 ot->
idname =
"SCREEN_OT_area_swap";
1736 static_cast<void *
>(area));
1737 return (newwin !=
nullptr);
1745 if (sad ==
nullptr) {
1787 ot->
name =
"Duplicate Area into New Window";
1788 ot->
description =
"Duplicate selected area into new window";
1789 ot->
idname =
"SCREEN_OT_area_dupli";
1821 float inner[4] = {0.0f, 0.0f, 0.0f, 0.7f};
1868 ot->
name =
"Close Area";
1870 ot->
idname =
"SCREEN_OT_area_close";
1940 bool *use_bigger_smaller_snap)
1943 *bigger = *smaller = 100000;
1945 if (use_bigger_smaller_snap !=
nullptr) {
1946 *use_bigger_smaller_snap =
false;
1951 size_min =
max_ii(size_min, 0);
1957 *smaller = area.
v4->
vec.
x - size_max;
1958 *bigger = area.
v4->
vec.
x - size_min;
1959 *use_bigger_smaller_snap =
true;
1964 *smaller = area.
v1->
vec.
y + size_min;
1965 *bigger = area.
v1->
vec.
y + size_max;
1966 *use_bigger_smaller_snap =
true;
1971 *smaller = area.
v1->
vec.
x + size_min;
1972 *bigger = area.
v1->
vec.
x + size_max;
1973 *use_bigger_smaller_snap =
true;
1978 *smaller = area.
v2->
vec.
y - size_max;
1979 *bigger = area.
v2->
vec.
y - size_min;
1980 *use_bigger_smaller_snap =
true;
1994 *bigger =
min_ii(*bigger, y1);
1997 *smaller =
min_ii(*smaller, y1);
2004 *bigger =
min_ii(*bigger, x1);
2007 *smaller =
min_ii(*smaller, x1);
2018 float factor = 1.0f;
2019 if (now < md->end_time) {
2030 float factor = 1.0f;
2036 if (now < md->end_time) {
2057 if (actedge ==
nullptr) {
2085 v1->editflag = v1->flag;
2088 bool use_bigger_smaller_snap =
false;
2116 const int xy[2] = {
x,
y};
2122 if (actedge ==
nullptr) {
2129 const int xy[2] = {
x,
y};
2153 v1->editflag = v1->flag;
2156 bool use_bigger_smaller_snap =
false;
2178 if (area ==
nullptr) {
2205 if (area ==
nullptr) {
2214 return anim_footer && anim_header;
2223 int m_cursor_final = -1;
2224 const int m_cursor = md->
origval + delta;
2231 m_cursor_final = m_cursor;
2233 m_cursor_final -= (m_cursor %
AREAGRID);
2246 int snap_pos = m_min;
2283 for (
int i = 0; i < snaps.
size(); i++) {
2284 if (
abs(m_cursor_final - snaps[i]) < snap_threshold) {
2285 m_cursor_final = snaps[i];
2309 const int interior_snap_divisor = 24;
2311 const int min_snap = int(
float(screen_size) /
float(interior_snap_divisor) / 4.0f);
2315 for (
int i = 1; i < interior_snap_divisor; i++) {
2316 snaps[i] = (screen_min +
round_fl_to_int(screen_size * i / interior_snap_divisor));
2318 snaps[interior_snap_divisor] = (m_min + m_span);
2321 for (
int i = 0; i < snaps.
size(); i++) {
2322 const int m_cursor_test = snaps[i];
2323 if (m_cursor_test < (m_min) ||
2324 (m_cursor_test > m_min && m_cursor_test < (m_min + min_snap)))
2329 if (m_cursor_test > (m_min + m_span) ||
2330 (m_cursor_test < (m_min + m_span) && m_cursor_test > (m_min + m_span - min_snap)))
2335 const int snap_dist_test =
abs(m_cursor - m_cursor_test);
2336 if (snap_dist_best >= snap_dist_test) {
2337 snap_dist_best = snap_dist_test;
2338 m_cursor_final = m_cursor_test;
2347 const int v_loc = (&v1.
vec.
x)[!axis];
2353 if (v_loc == (&
v2.vec.x)[!axis]) {
2354 const int v_loc2 = (&
v2.vec.x)[axis];
2357 const int snap_dist_test =
abs(m_cursor - v_loc2);
2358 if (snap_dist_best >= snap_dist_test) {
2359 snap_dist_best = snap_dist_test;
2360 m_cursor_final = v_loc2;
2375 return m_cursor_final;
2382 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
2383 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
2389 short final_loc = -1;
2390 bool doredraw =
false;
2397 final_loc = md->
origval + delta;
2409 short oldval = (&v1->vec.x)[axis];
2410 (&v1->vec.x)[axis] = final_loc;
2412 if (oldval == final_loc) {
2422 bool redraw_all =
false;
2424 if (area->v1->editflag || area->v2->editflag || area->v3->editflag || area->v4->editflag) {
2428 if (
abs(height - area->global->size_min) <
abs(height - area->global->size_max)) {
2429 area->global->cur_fixed_height = area->global->size_min;
2432 area->global->cur_fixed_height = area->global->size_max;
2508 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
2509 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
2536 switch (event->
type) {
2558 win, screen, event->
xy[0], event->
xy[1]);
2569 switch (event->
val) {
2598 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
2599 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
2613 ot->
name =
"Move Area Edges";
2615 ot->
idname =
"SCREEN_OT_area_move";
2668 ot->
name =
"Merge Area Edge";
2670 ot->
idname =
"SCREEN_OT_edge_merge";
2738 if (!area || area->
global) {
2784 if (area ==
nullptr) {
2821 if (sav1 == sbv4 && sav2 == sbv3) {
2824 if (sav2 == sbv1 && sav3 == sbv4) {
2827 if (sav3 == sbv2 && sav4 == sbv1) {
2830 if (sav1 == sbv2 && sav4 == sbv3) {
2853 if (sd->
narea ==
nullptr) {
2946 if (sad ==
nullptr || sad->
modifier > 0) {
2951 if (sad->
sa1 ==
nullptr || sad->
az ==
nullptr) {
2963 const bool is_left = factor_v < 0.5f;
2964 const bool is_bottom = factor_h < 0.5f;
2965 const bool is_right = !is_left;
2966 const bool is_top = !is_bottom;
2979 if ((is_top && is_left) || (is_bottom && is_right)) {
2980 factor = 1.0f - factor;
2994 if (area ==
nullptr) {
3000 op->
ptr, prop_factor,
float(event->
xy[0] - area->
v1->
vec.
x) /
float(area->
winx));
3004 op->
ptr, prop_factor,
float(event->
xy[1] - area->
v1->
vec.
y) /
float(area->
winy));
3027 if (actedge ==
nullptr) {
3074 int m_cursor_final = -1;
3075 const int m_cursor = origval + delta;
3076 const int m_span =
float(bigger + smaller);
3077 const int m_min = origval - smaller;
3082 const float div_array[] = {
3098 for (
int i = 0; i <
ARRAY_SIZE(div_array); i++) {
3099 const int m_cursor_test = m_min +
round_fl_to_int(m_span * div_array[i]);
3100 const int snap_dist_test =
abs(m_cursor - m_cursor_test);
3101 if (snap_dist_best >= snap_dist_test) {
3102 snap_dist_best = snap_dist_test;
3103 m_cursor_final = m_cursor_test;
3112 const int v_loc = (&v1.
vec.
x)[!axis];
3118 if (v_loc == (&
v2.vec.x)[!axis]) {
3119 const int v_loc2 = (&
v2.vec.x)[axis];
3121 if ((origval - smaller) < v_loc2 && v_loc2 < (origval + bigger)) {
3122 const int snap_dist_test =
abs(m_cursor - v_loc2);
3123 if (snap_dist_best >= snap_dist_test) {
3124 snap_dist_best = snap_dist_test;
3125 m_cursor_final = v_loc2;
3134 return m_cursor_final;
3141 bool update_factor =
false;
3144 switch (event->
type) {
3146 update_factor =
true;
3150 float inner[4] = {1.0f, 1.0f, 1.0f, 0.1f};
3151 float outline[4] = {1.0f, 1.0f, 1.0f, 0.3f};
3172 update_factor =
true;
3185 update_factor =
true;
3192 if (update_factor) {
3247 {0,
nullptr, 0,
nullptr,
nullptr},
3252 ot->
name =
"Split Area";
3253 ot->
description =
"Split selected area into new windows";
3254 ot->
idname =
"SCREEN_OT_area_split";
3350 rmd->
edge = az->edge;
3400 short *size, maxsize = -1;
3411 if (*size > maxsize && maxsize > 0) {
3431 if (region_tool_header !=
nullptr) {
3444 const int size_no_snap,
3470 rmd->
origval = axis_x ? target->sizex : target->sizey;
3480 switch (event->
type) {
3482 bool size_changed =
false;
3489 const int snap_size_threshold_x = (
U.widget_unit * 2) / aspect_x;
3490 delta =
event->xy[0] - rmd->
orig_xy[0];
3498 const int size_no_snap = rmd->
origval + delta;
3507 if ((
abs(rmd->
region->
sizex - sizex_test) < snap_size_threshold_x) &&
3509 sizex_test <= rmd->maxsize)
3518 if (size_no_snap < collapse_size) {
3534 size_changed =
true;
3543 const int snap_size_threshold_y = (
U.widget_unit * 2) / aspect_y;
3544 delta =
event->xy[1] - rmd->
orig_xy[1];
3552 const int size_no_snap = rmd->
origval + delta;
3561 if ((
abs(rmd->
region->
sizey - sizey_test) < snap_size_threshold_y) &&
3563 (sizey_test <= rmd->maxsize))
3573 if (size_no_snap < (
UI_UNIT_Y / 4) / aspect_y) {
3589 size_changed =
true;
3659 ot->
name =
"Scale Region Size";
3661 ot->
idname =
"SCREEN_OT_region_scale";
3743 switch (event->
type) {
3755 quad_x =
round(quad_x * 12.0f) / 12.0f;
3756 quad_y =
round(quad_y * 12.0f) / 12.0f;
3764 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
3798 ot->
name =
"Quad View Resize";
3800 ot->
idname =
"SCREEN_OT_quadview_size";
3883 const int frames_since_start = frame - range.
start_frame;
3884 int offset = frames_since_start % range_size;
3886 offset += range_size;
3903 if (delta < 0 && scene->r.subframe > 0) {
3906 scene->
r.
cfra += delta;
3909 if (wrap_timeline_navigation) {
3931 ot->
name =
"Frame Offset";
3932 ot->
idname =
"SCREEN_OT_frame_offset";
3933 ot->
description =
"Move current frame forward/backward by a given number";
4000 ot->
name =
"Jump to Endpoint";
4001 ot->
description =
"Jump to first/last frame in frame range";
4002 ot->
idname =
"SCREEN_OT_frame_jump";
4012 ot->
srna,
"end",
false,
"Last Frame",
"Jump to the last frame of the frame range");
4027 if (scene ==
nullptr) {
4037 int step = int(delta);
4038 float fraction = delta -
step;
4056 const int frame_offset = int(subframe_offset);
4057 scene->
r.
cfra += frame_offset;
4062 if (wrap_timeline_navigation) {
4082 ot->
name =
"Jump Time by Delta";
4083 ot->
description =
"Jump forward/backward by a given number of frames or seconds";
4084 ot->
idname =
"SCREEN_OT_time_jump";
4130 fcurve_to_keylist(ale.adt, fcu, &keylist, 0, {-FLT_MAX, FLT_MAX}, use_nla_mapping);
4163 nullptr, id_cast<const GreasePencil *>(ob->
data), &keylist, 0, active_layer_only);
4176template<
typename KeyColumnIterator>
4179 KeyColumnIterator key_columns)
4182 if (playback_range.
contains(ak_wrap.cfra)) {
4198 if (scene ==
nullptr) {
4233 while ((ak !=
nullptr) && (done ==
false)) {
4234 if (wrap_timeline_navigation) {
4246 if (cfra < ak->cfra) {
4256 if (!done && wrap_timeline_navigation) {
4264 while ((ak !=
nullptr) && (done ==
false)) {
4265 if (wrap_timeline_navigation) {
4277 if (cfra > ak->
cfra) {
4287 if (!done && wrap_timeline_navigation) {
4297 if (done ==
false) {
4320 ot->
name =
"Jump to Keyframe";
4321 ot->
description =
"Jump to previous/next keyframe";
4322 ot->
idname =
"SCREEN_OT_keyframe_jump";
4346 const ListBaseT<TimeMarker> &markers,
4347 const int from_frame,
4349 const std::optional<ScenePlaybackRange> playback_range)
4354 if (playback_range && !playback_range->contains(marker.frame)) {
4360 if (marker.frame <= from_frame) {
4364 closest = std::min(
closest.value_or(marker.frame), marker.frame);
4368 if (marker.frame >= from_frame) {
4372 closest = std::max(
closest.value_or(marker.frame), marker.frame);
4387 std::optional<ScenePlaybackRange> playback_range;
4403 *markers, scene->
r.
cfra, direction, playback_range);
4408 if (!frame_to_jump_to && playback_range) {
4410 (playback_range->start_frame - 1) :
4411 (playback_range->end_frame + 1);
4416 if (!frame_to_jump_to) {
4422 scene->
r.
cfra = *frame_to_jump_to;
4438 ot->
name =
"Jump to Marker";
4440 ot->
idname =
"SCREEN_OT_marker_jump";
4463 if (delta == 0) [[unlikely]] {
4475 ot->
name =
"Set Screen";
4476 ot->
description =
"Cycle through available screens";
4477 ot->
idname =
"SCREEN_OT_screen_set";
4504 if (area_iter.
full) {
4510 if (area ==
nullptr) {
4546 wm->runtime->drags.is_empty();
4553 ot->
name =
"Toggle Maximize Area";
4554 ot->
description =
"Toggle display selected area as fullscreen/maximized";
4555 ot->
idname =
"SCREEN_OT_screen_full_area";
4562 ot->
srna,
"use_hide_panels",
false,
"Hide Panels",
"Hide all the panels (Focus Mode)");
4624 if (!sd || !sd->
sa1) {
4628 float factor = 1.0f;
4630 if (now < sd->end_time) {
4638 else if (sd->
sa2 && (sd->
sa1 != sd->
sa2)) {
4651 float factor = 1.0f;
4653 if (now < jd->end_time) {
4686 if (sa1 ==
nullptr && sa2 ==
nullptr) {
4703 if (sa1 ==
nullptr) {
4742 float inner[4] = {1.0f, 1.0f, 1.0f, 0.1f};
4743 float outline[4] = {1.0f, 1.0f, 1.0f, 0.3f};
4755 if (screen->
areabase.is_single()) {
4822 if (sad ==
nullptr || sad->
modifier > 0 || sad->
sa1 ==
nullptr) {
4871 bool aligned_neighbors = (offset1 == 0 && offset2 == 0);
4872 bool same_area = (jd->
sa1 == jd->
sa2);
4886 if (jd->
factor <= 0.5f) {
4900 float inner[4] = {1.0f, 1.0f, 1.0f, 0.15f};
4901 float outline[4] = {1.0f, 1.0f, 1.0f, 0.4f};
4920 float inner[4] = {0.0f, 0.0f, 0.0f, 0.7f};
4937 if (event->
xy[0] < 0 || event->
xy[0] > jd->
win1->
sizex || event->
xy[1] < 1 ||
4947 if (screen && screen->
temp) {
4978#if defined(__APPLE__)
4990 const bool alt =
event->modifier &
KM_ALT;
4991 const bool ctrl =
event->modifier &
KM_CTRL;
4992 const float accel = (alt || ctrl) ? 2.5f : 2.0;
4994 float factor = pos * accel;
4997 if (factor >= 0.4375f && factor < 0.5f) {
5000 else if (factor >= 0.5f && factor < 0.5625f) {
5006 if (factor < 0.1875f) {
5009 else if (factor >= 0.1875f && factor < 0.3125f) {
5012 else if (factor >= 0.3125f && factor < 0.4375f) {
5015 else if (factor >= 0.5625f && factor < 0.6875f) {
5018 else if (factor >= 0.6875f && factor < 0.8125f) {
5021 else if (factor > 0.8125f) {
5035 if (jd->
sa1 == jd->
sa2) {
5041 if (screen && screen->
temp) {
5054 const int x =
event->xy[0] + win1_posx - win2_posx - jd->
sa2->
totrct.
xmin;
5055 const int y =
event->xy[1] + win1_posy - win2_posy - jd->
sa2->
totrct.
ymin;
5097 if (jd->
sa2->
winx < (min_x * 3)) {
5098 if (fac_y > 0.4f && fac_y < 0.6f) {
5101 if (
float(
y) >
float(jd->
sa2->
winy) / 2.0f) {
5108 if (jd->
sa2->
winy < (min_y * 3)) {
5109 if (fac_x > 0.4f && fac_x < 0.6f) {
5112 if (
float(
x) >
float(jd->
sa2->
winx) / 2.0f) {
5121 if (fac_x > 0.4f && fac_x < 0.6f && fac_y > 0.4f && fac_y < 0.6f) {
5128 const bool upper_left =
float(
x) /
float(
y + 1) < area_ratio;
5132 if (upper_left && !lower_left) {
5136 if (!upper_left && lower_left) {
5140 if (upper_left && lower_left) {
5144 if (!upper_left && !lower_left) {
5165 const int v_loc = (&v1.vec.x)[axis];
5166 const int v_dist =
abs(v_loc - event->
xy[axis]);
5167 if (v_dist < dist) {
5176 float frac_fac =
round(fac * 12.0f) / 12.0f;
5179 fac = (
fabs(near_fac - fac) <
fabs(frac_fac - fac)) ? near_fac : frac_fac;
5183 if (fac >= 0.48f && fac < 0.5f) {
5186 else if (fac >= 0.5f && fac < 0.52f) {
5195 if (min_fac < 0.5f) {
5196 return std::clamp(fac, min_fac, 1.0f - min_fac);
5208#if (OS_WINDOWS || OS_MAC)
5223 if (win_count > 1) {
5237 if (jd->
sa2 != area) {
5242 if (jd->
sa1 == area) {
5245 if (!(
abs(jd->
start_x - event->
xy[0]) > drag_threshold ||
5283 IFACE_(
"Horizontal Split"),
5284 ICON_SPLIT_HORIZONTAL,
5292 ptr = layout.
op(
"SCREEN_OT_area_split",
5293 IFACE_(
"Vertical Split"),
5294 ICON_SPLIT_VERTICAL,
5303 layout.
op(
"SCREEN_OT_area_join",
IFACE_(
"Move/Join/Dock Area"), ICON_AREA_DOCK);
5307 layout.
op(
"SCREEN_OT_screen_full_area",
5311 ptr = layout.
op(
"SCREEN_OT_screen_full_area",
IFACE_(
"Focus Mode"), ICON_NONE);
5314 layout.
op(
"SCREEN_OT_area_dupli", std::nullopt, ICON_NONE);
5316 layout.
op(
"SCREEN_OT_area_close",
IFACE_(
"Close Area"), ICON_X);
5318 popup_menu_end(
C, pup);
5358 if (jd ==
nullptr) {
5363 switch (event->
type) {
5374 status.
item(
IFACE_(
"Split/Dock"), ICON_MOUSE_LMB_DRAG);
5375 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
5378 status.
item(
IFACE_(
"Select Split"), ICON_MOUSE_LMB_DRAG);
5379 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
5385 status.
item(
IFACE_(
"Select Area"), ICON_MOUSE_LMB_DRAG);
5386 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
5389 status.
item(
IFACE_(
"Select Location"), ICON_MOUSE_LMB_DRAG);
5390 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
5412 if (jd->
sa1 && !jd->
sa2) {
5414 if (event->
xy[0] < 0 || event->
xy[0] > jd->
win1->
sizex || event->
xy[1] < 1 ||
5432 else if (jd->
sa1 && jd->
sa1 == jd->
sa2) {
5435 float inner[4] = {1.0f, 1.0f, 1.0f, 0.1f};
5436 float outline[4] = {1.0f, 1.0f, 1.0f, 0.3f};
5453 if (large_v || large_h) {
5491 const bool do_close_win = jd->
close_win;
5533 ot->
name =
"Join Area";
5534 ot->
description =
"Join selected areas into new window";
5535 ot->
idname =
"SCREEN_OT_area_join";
5592 IFACE_(
"Vertical Split"),
5593 ICON_SPLIT_VERTICAL,
5601 ptr = layout.
op(
"SCREEN_OT_area_split",
5602 IFACE_(
"Horizontal Split"),
5603 ICON_SPLIT_HORIZONTAL,
5618 ptr = layout.
op(
"SCREEN_OT_area_join",
5628 "SCREEN_OT_area_join",
5642 ptr = layout.
op(
"SCREEN_OT_area_swap",
5652 ptr = layout.
op(
"SCREEN_OT_edge_merge",
5660 popup_menu_end(
C, pup);
5668 ot->
name =
"Area Edge Options";
5669 ot->
description =
"Operations for splitting and merging";
5670 ot->
idname =
"SCREEN_OT_area_options";
5712 ot->
name =
"Clean Up Space Data";
5713 ot->
description =
"Remove unused settings for invisible editors";
5714 ot->
idname =
"SCREEN_OT_spacedata_cleanup";
5733 return !
wm->runtime->operators.is_empty();
5747 lastop = lastop->
prev;
5761 ot->
name =
"Repeat Last";
5763 ot->
idname =
"SCREEN_OT_repeat_last";
5783 int items =
wm->runtime->operators.count();
5790 ui::Layout &layout = *popup_menu_layout(pup);
5794 for (i = items - 1, lastop =
wm->runtime->operators.last(); lastop; lastop = lastop->
prev, i--) {
5802 popup_menu_end(
C, pup);
5827 ot->
name =
"Repeat History";
5828 ot->
description =
"Display menu for previous actions performed";
5829 ot->
idname =
"SCREEN_OT_repeat_history";
5861 ot->
name =
"Redo Last";
5862 ot->
description =
"Display parameters for last action performed";
5863 ot->
idname =
"SCREEN_OT_redo_last";
5903 rv3d->
persp = persp;
5938 if (region != region_user) {
5972 else if (region->
next) {
5981 for (
int count = 0; count < 3; count++) {
5989 int index_qsplit = 0;
6006 (region = region->
next),
6011 (region = region->
next),
6037 ot->
name =
"Toggle Quad View";
6038 ot->
description =
"Split selected area into camera, front, right, and top views";
6039 ot->
idname =
"SCREEN_OT_region_quadview";
6089 ot->
name =
"Toggle Region";
6090 ot->
idname =
"SCREEN_OT_region_toggle";
6103 "Type of the region to toggle");
6157 ot->
name =
"Flip Region";
6158 ot->
idname =
"SCREEN_OT_region_flip";
6159 ot->
description =
"Toggle the region's alignment (left/right or top/bottom)";
6189 ot->
name =
"Expand/Collapse Header Menus";
6190 ot->
idname =
"SCREEN_OT_header_toggle_menus";
6191 ot->
description =
"Expand or collapse the header pull-down menus";
6212 IFACE_(
"Move/Split Area"),
6219 layout.
op(
"SCREEN_OT_screen_full_area",
6224 ptr = layout.
op(
"SCREEN_OT_screen_full_area",
6232 layout.
op(
"SCREEN_OT_area_dupli", std::nullopt, ICON_NONE);
6234 layout.
op(
"SCREEN_OT_area_close", std::nullopt, ICON_X);
6253 &ptr,
"show_region_tool_header",
UI_ITEM_NONE,
IFACE_(
"Show Tool Settings"), ICON_NONE);
6256 col.
op(
"SCREEN_OT_header_toggle_menus",
6291 IFACE_(
"Flip to Bottom");
6296 layout->
op(
"SCREEN_OT_region_flip", but_flip_str, ICON_NONE);
6304 &ptr,
"show_statusbar_scene_duration",
UI_ITEM_NONE,
IFACE_(
"Scene Duration"), ICON_NONE);
6310 &ptr,
"show_extensions_updates",
UI_ITEM_NONE,
IFACE_(
"Extensions Updates"), ICON_NONE);
6325 popup_menu_end(
C, pup);
6332 popup_menu_end(
C, pup);
6338 popup_menu_end(
C, pup);
6347 layout.
op(
"SCREEN_OT_region_toggle",
IFACE_(
"Hide"), ICON_NONE);
6354 popup_menu_end(
C, pup);
6364 ot->
name =
"Region";
6366 ot->
idname =
"SCREEN_OT_region_context_menu";
6383 bool from_anim_edit)
6388 switch (spacetype) {
6428 if ((redraws &
TIME_CLIPS) || from_anim_edit) {
6469 switch (spacetype) {
6482 switch (spacetype) {
6571#ifdef PROFILE_AUDIO_SYNC
6572 static int old_frame = 0;
6597 if (scene_eval ==
nullptr) {
6607 scene->
r.
cfra =
round(time * scene->frames_per_second());
6609#ifdef PROFILE_AUDIO_SYNC
6610 newfra_int = scene->
r.
cfra;
6611 if (newfra_int < old_frame) {
6612 printf(
"back -%d jump detected, frame %d!\n", old_frame - newfra_int, old_frame);
6614 else if (newfra_int > old_frame + 1) {
6615 printf(
"forward +%d jump detected, frame %d!\n", newfra_int - old_frame, old_frame);
6618 old_frame = newfra_int;
6626 double delta_frames = wt->
time_delta * scene->frames_per_second();
6631 if (delta_frames < 1.0) {
6637 delta_frames = 1.0f;
6645 const int step = delta_frames;
6669 bool do_stop_playback =
false;
6672 const int start_frame = scene->playback_start();
6673 const int end_frame = scene->playback_end();
6675 const bool is_extreme_frame = is_playing_forward ? scene->
r.
cfra > end_frame :
6676 scene->
r.
cfra < start_frame;
6677 if (is_extreme_frame) {
6682 do_stop_playback =
true;
6685 scene->
r.
cfra = is_playing_forward ? start_frame : end_frame;
6692 CLAMP(scene->
r.
cfra, start_frame, end_frame);
6693 do_stop_playback =
true;
6697 do_stop_playback =
true;
6700 if (is_playing_forward) {
6703 scene->
r.
cfra = end_frame - 1;
6708 scene->
r.
cfra = start_frame + 1;
6710 CLAMP(scene->
r.
cfra, start_frame, end_frame);
6730#ifdef PROFILE_AUDIO_SYNC
6731 old_frame = scene->
r.
cfra;
6740 if (depsgraph !=
nullptr) {
6755 bool redraw =
false;
6756 if (®ion == sad->
region) {
6791 wt->
time_step = (1.0 / scene->frames_per_second());
6793 if (do_stop_playback) {
6803 ot->
name =
"Animation Step";
6804 ot->
description =
"Step through animation by position";
6805 ot->
idname =
"SCREEN_OT_animation_step";
6829 const bool is_playing = screen !=
nullptr;
6830 bool playback_sync =
false;
6831 int play_direction = 0;
6974 const int frame_before_loop_jump = scene->
r.
cfra;
6986 const bool is_playing_forward = mode > 0;
6987 const int end_frame = is_playing_forward ? scene->playback_end() : scene->playback_start();
6988 if (scene->
r.
cfra == end_frame) {
6989 const int start_frame = is_playing_forward ? scene->playback_start() : scene->playback_end();
6990 scene->
r.
cfra = start_frame;
7018 sad->
sfra = frame_before_loop_jump;
7050 if (!play_screen || !play_screen->
animtimer) {
7051 return std::nullopt;
7055 if (sad ==
nullptr) {
7056 return std::nullopt;
7062 return std::nullopt;
7080 const std::optional<PreScrubbingState> &resume)
7085 if (resume.has_value()) {
7116 ot->
name =
"Play Animation";
7118 ot->
idname =
"SCREEN_OT_animation_play";
7127 ot->
srna,
"reverse",
false,
"Play in Reverse",
"Animation is played backwards");
7129 prop =
RNA_def_boolean(ot->
srna,
"sync",
false,
"Sync",
"Drop frames to maintain framerate");
7165 ot->
name =
"Pause Animation";
7166 ot->
description =
"Pause animation, stopping at the current frame";
7167 ot->
idname =
"SCREEN_OT_animation_pause";
7190 if (restore_start_frame) {
7198 if (restore_start_frame) {
7200 scene->
r.
cfra = frame;
7212 ot->
name =
"Cancel Animation";
7213 ot->
description =
"Cancel animation, returning to the original frame";
7214 ot->
idname =
"SCREEN_OT_animation_cancel";
7225 "Restore the frame when animation was initialized");
7255 int event_type =
RNA_int_get(op->ptr,
"event_type");
7258 printf(
"box select do select\n");
7261 printf(
"box select deselect\n");
7264 printf(
"box select do something\n");
7273 ot->name =
"Box Select";
7274 ot->idname =
"SCREEN_OT_box_select";
7277 ot->exec = box_select_exec;
7324 ot->
name =
"Back to Previous Screen";
7325 ot->
description =
"Revert back to the original screen layout, before fullscreen area overlay";
7326 ot->
idname =
"SCREEN_OT_back_to_previous";
7376 const char *section_name;
7378 return fmt::format(fmt::runtime(
TIP_(
"Show {} preferences")), section_name);
7390 ot->
name =
"Open Preferences...";
7391 ot->
description =
"Edit user preferences and system settings";
7392 ot->
idname =
"SCREEN_OT_userpref_show";
7404 "Section to activate in the Preferences");
7450 ot->
name =
"Open Project Settings...";
7452 ot->
idname =
"SCREEN_OT_project_settings_show";
7463 "Section to activate in Project Settings");
7490 bool driven, special;
7492 C, &ptr, prop,
index,
nullptr,
nullptr, &driven, &special);
7524 ot->
name =
"Show Drivers Editor";
7525 ot->
description =
"Show drivers editor in a separate window";
7526 ot->
idname =
"SCREEN_OT_drivers_editor_show";
7552 ot->
name =
"Show Info Log";
7553 ot->
description =
"Show info log in a separate window";
7554 ot->
idname =
"SCREEN_OT_info_log_show";
7584 ot->
name =
"New Screen";
7586 ot->
idname =
"SCREEN_OT_new";
7613 ot->
name =
"Delete Screen";
7615 ot->
idname =
"SCREEN_OT_delete";
7638#define TIMEOUT 0.22f
7639#define TIMESTEP (1.0f / 60.0f)
7647 region = region->
prev;
7661 CLAMP(alpha, 0.0f, 1.0f);
7663 const float alpha_easing = alpha * (2.0f - alpha);
7664 return alpha_easing;
7671 *r_rect = region->
winrct;
7673 if (alpha >= 1.0f) {
7680 r_rect->
xmin += ofs_x;
7683 r_rect->
xmax -= ofs_x;
7686 r_rect->
ymin += ofs_y;
7689 r_rect->
ymax -= ofs_y;
7807 ot->
name =
"Region Alpha";
7808 ot->
idname =
"SCREEN_OT_region_blend";
7809 ot->
description =
"Blend in and out overlapping region";
7856 for (
int i = 1; i < item_len; i++) {
7858 if ((item_test->
value >> 16) == space_type) {
7875 ot->
name =
"Cycle Space Type Set";
7876 ot->
description =
"Set the space type or cycle subtype";
7877 ot->
idname =
"SCREEN_OT_space_type_set_or_cycle";
7897 {0,
nullptr, 0,
nullptr,
nullptr},
7916 const char *propname;
7921 &screen->
id, RNA_SpaceProperties, area->
spacedata.first());
7922 propname =
"context";
7926 propname =
"active_section";
7957 ot->
name =
"Cycle Space Context";
7958 ot->
description =
"Cycle through the editor context by activating the next/previous one";
7959 ot->
idname =
"SCREEN_OT_space_context_cycle";
7972 "Direction to cycle through");
7995 if (ordered.
size() == 1) {
8002 switch (direction) {
8005 ordered[
index - 1]);
8008 workspace_dst =
reinterpret_cast<WorkSpace *
>(
8023 ot->
name =
"Cycle Workspace";
8025 ot->
idname =
"SCREEN_OT_workspace_cycle";
8038 "Direction to cycle through");
8116 {0,
nullptr, 0,
nullptr,
nullptr},
8171 return fmt::format(fmt::runtime(
TIP_(
"Link {}")), dragged_scene_name);
8173 return fmt::format(fmt::runtime(
TIP_(
"Pack {}")), dragged_scene_name);
8175 return fmt::format(fmt::runtime(
TIP_(
"Append {}")), dragged_scene_name);
8177 return fmt::format(fmt::runtime(
TIP_(
"Append (Reuse) {}")), dragged_scene_name);
8180 return fmt::format(fmt::runtime(
TIP_(
"Set {} as active")), dragged_scene_name);
8201 "SCENE_OT_drop_scene_asset",
General operations, lookup, etc. for blender objects.
Platform independent time functions.
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_ID_SCREEN
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define OB_MODE_ALL_WEIGHT_PAINT
Object is a sort of wrapper for general info.
#define RGN_ALIGN_ENUM_FROM_MASK(align)
#define AREAMAP_FROM_SCREEN(screen)
#define FRAMENUMBER_MIN_CLAMP(cfra)
#define ED_screen_verts_iter(win, screen, vert_name)
#define ED_screen_areas_iter(win, screen, area_name)
Read Blender memory allocation and freeing.
#define UI_REGION_OVERLAP_MARGIN
#define UI_PANEL_CATEGORY_MIN_WIDTH
#define UI_AZONESPOTW_RIGHT
#define UI_TIME_SCRUB_MARGIN_Y
#define V2D_SCROLL_HIDE_WIDTH
#define V2D_SCROLL_HIDE_HEIGHT
#define ND_ANIMATION_PLAYBACK
#define ND_SPACE_SEQUENCER
#define ND_SPACE_SPREADSHEET
#define BLI_assert_msg(a, msg)
#define IN_RANGE_INCL(a, b, c)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
bool closest(btVector3 &v)
void append(const T &value)
const T & last(const int64_t n=0) const
IndexRange index_range() const
int64_t first_index_of(const T &value) const
void item(std::string text, int icon1, int icon2=0)
void item_bool(std::string text, bool inverted, int icon1, int icon2=0)
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
void free(Subdiv *subdiv)
Scene * scene_or_sequencer_scene_from_context(const bContext &C)
ListBaseT< bAnimListElem > get_editable_fcurves(bAnimContext &ac)
Object * context_active_object(const bContext *C)
bool has_playback_animation(const Scene *scene)
void sync_active_scene_and_time_with_scene_strip(bContext &C)
bool region_button_sections_is_inside_x(const ARegion *region, const int mval_x)
void drop_color_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
void view2d_curRect_validate(View2D *v2d)
bool drop_color_poll(bContext *C, wmDrag *drag, const wmEvent *event)
float view2d_view_to_region_y(const View2D *v2d, float y)
PopupMenu * popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void panel_category_active_set(ARegion *region, const char *idname)
Layout * popup_menu_layout(PopupMenu *pup)
char view2d_mouse_in_scrollers_ex(const ARegion *region, const View2D *v2d, const int xy[2], int *r_scroll) ATTR_NONNULL(1
Button * context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
float view2d_view_to_region_x(const View2D *v2d, float x)
bool ED_view3d_context_user_region(bContext *C, View3D **r_v3d, ARegion **r_region)
static const EnumPropertyItem prop_direction_items[]
void WM_main_add_notifier(uint type, void *reference)
static void SCREEN_OT_workspace_cycle(wmOperatorType *ot)
static bool area_join_apply(bContext *C, wmOperator *op)
WorkSpaceLayout * ED_workspace_layout_duplicate(Main *bmain, WorkSpace *workspace, const WorkSpaceLayout *layout_old, wmWindow *win) ATTR_NONNULL()
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static void SCREEN_OT_info_log_show(wmOperatorType *ot)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
const char * WM_drag_get_single_path(const wmDrag *drag)
static wmOperatorStatus area_swap_modal(bContext *C, wmOperator *op, const wmEvent *event)
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt)
bool ED_operator_scene_editable(bContext *C)
void screen_stop_playback(Main *bmain, wmWindowManager *wm, wmWindow *win, bScreen *screen)
bool ED_operator_node_active(bContext *C)
bool ED_undo_has_redo_step(const bContext *C)
eScreenDir area_getorientation(ScrArea *sa_a, ScrArea *sa_b)
bool ED_operator_animview_active(bContext *C)
bool ED_operator_uvedit(bContext *C)
bool ED_operator_posemode_exclusive(bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
static wmOperatorStatus screen_animation_pause_exec(bContext *C, wmOperator *)
bool screen_area_close(bContext *C, ReportList *reports, bScreen *screen, ScrArea *area, ScrArea *not_area)
void ED_region_blend_rect(ARegion *region, rcti *r_rect)
static wmOperatorStatus repeat_last_exec(bContext *C, wmOperator *)
int screen_area_join(bContext *C, ReportList *reports, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
static wmOperatorStatus region_flip_exec(bContext *C, wmOperator *)
wmDropBox * WM_dropbox_add(ListBaseT< wmDropBox > *lb, const char *idname, bool(*poll)(bContext *C, wmDrag *drag, const wmEvent *event), void(*copy)(bContext *C, wmDrag *drag, wmDropBox *drop), void(*cancel)(Main *bmain, wmDrag *drag, wmDropBox *drop), WMDropboxTooltipFunc tooltip)
static void SCREEN_OT_animation_step(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
static void SCREEN_OT_animation_pause(wmOperatorType *ot)
void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free)
static wmOperatorStatus screen_animation_play_exec(bContext *C, wmOperator *op)
void ED_area_tag_redraw_no_rebuild(ScrArea *area)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void WM_event_add_notifier_ex(wmWindowManager *wm, const wmWindow *win, uint type, void *reference)
Scene * CTX_data_sequencer_scene(const bContext *C)
ScrEdge * screen_geom_find_active_scredge(const wmWindow *win, const bScreen *screen, const int mx, const int my)
static void area_swap_cancel(bContext *C, wmOperator *op)
void ED_screen_animation_timer(bContext *C, Scene *scene, ViewLayer *view_layer, int redraws, int sync, int enable)
static void actionzone_apply(bContext *C, wmOperator *op, int type)
static void keylist_from_dopesheet(bContext &C, AnimKeylist &keylist)
static bool screen_active_editable(bContext *C)
bool ED_operator_graphedit_active(bContext *C)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
static bool region_toggle_poll(bContext *C)
wmDragAsset * WM_drag_get_asset_data(const wmDrag *drag, int idcode)
const EnumPropertyItem rna_enum_space_type_items[]
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static wmOperatorStatus repeat_history_exec(bContext *C, wmOperator *op)
static AZone * screen_actionzone_find_xy(bScreen *screen, const int xy[2])
void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *area)
void WM_drag_free_imported_drag_ID(Main *bmain, wmDrag *drag, wmDropBox *drop)
Free asset ID imported for canceled drop.
wmOperatorStatus WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool screen_maximize_area_poll(bContext *C)
static wmOperatorStatus actionzone_modal(bContext *C, wmOperator *op, const wmEvent *event)
bool ED_operator_region_nla_active(bContext *C)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
static void SCREEN_OT_marker_jump(wmOperatorType *ot)
static bool space_context_cycle_poll(bContext *C)
bool ED_operator_nla_active(bContext *C)
static void view3d_localview_update_rv3d(RegionView3D *rv3d)
@ BKE_CB_EVT_ANIMATION_PLAYBACK_PRE
@ BKE_CB_EVT_ANIMATION_PLAYBACK_POST
int ED_area_max_regionsize(const ScrArea *area, const ARegion *scale_region, const AZEdge edge)
ScrArea * area_split(const wmWindow *win, bScreen *screen, ScrArea *area, const eScreenAxis dir_axis, const float fac)
Depsgraph * BKE_scene_get_depsgraph(const Scene *scene, const ViewLayer *view_layer)
static bool area_split_apply(bContext *C, wmOperator *op)
WorkSpace * CTX_wm_workspace(const bContext *C)
static void screen_area_menu_items(ScrArea *area, ui::Layout &layout)
void ED_keymap_screen(wmKeyConfig *keyconf)
bool ED_operator_editlattice(bContext *C)
void ED_region_visibility_change_update_ex(bContext *C, ScrArea *area, ARegion *region, bool is_hidden, bool do_init)
int BLI_rcti_length_x(const rcti *rect, int x)
void screen_draw_split_preview(ScrArea *area, const eScreenAxis dir_axis, const float factor)
void ANIM_anim_channels_select_set(bAnimContext *ac, eAnimChannels_SetFlag sel)
bool ED_operator_object_active_local_editable_ex(bContext *C, const Object *ob)
MINLINE int round_fl_to_int(float a)
static void region_quadview_init_rv3d(ScrArea *area, ARegion *region, const eRegionView3D_ViewLock viewlock, const eRegionView3D_View view, const eRegionView3D_Persp persp)
static void SCREEN_OT_edge_merge(wmOperatorType *ot)
static wmOperatorStatus area_dupli_invoke(bContext *C, wmOperator *op, const wmEvent *event)
MINLINE int square_i(int a)
static wmOperatorStatus info_log_show_exec(bContext *C, wmOperator *op)
static void screen_animation_region_tag_redraw(bContext *C, ScrArea *area, ARegion *region, const Scene *scene, eScreen_Redraws_Flag redraws)
void ED_screen_global_areas_sync(wmWindow *win)
const std::string WM_drag_get_item_name(wmDrag *drag)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
void ED_screens_footer_tools_menu_create(bContext *C, ui::Layout *layout, void *arg)
void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, eAnimFilter_Flags filter, void *channel_data, eAnim_ChannelType channel_type)
static int area_split_snap_calc_location(const bScreen *screen, const int delta, const int origval, const eScreenAxis dir_axis, const int bigger, const int smaller)
void BKE_screen_remove_unused_scredges(bScreen *screen)
static void SCREEN_OT_actionzone(wmOperatorType *ot)
void BKE_screen_remove_unused_scrverts(bScreen *screen)
static void SCREEN_OT_spacedata_cleanup(wmOperatorType *ot)
static void SCREEN_OT_region_flip(wmOperatorType *ot)
static wmOperatorStatus screen_context_menu_invoke(bContext *C, wmOperator *, const wmEvent *)
bool screen_geom_edge_can_extend(const wmWindow *win, ScrEdge *edge)
static void SCREEN_OT_screen_set(wmOperatorType *ot)
bool ED_operator_buttons_active(bContext *C)
bool ED_operator_object_active_editable_font(bContext *C)
ScrArea * ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *area, eScreen_State state)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool ED_fileselect_is_asset_browser(const SpaceFile *sfile)
static void keymap_modal_set(wmKeyConfig *keyconf)
static bool area_close_poll(bContext *C)
static void area_swap_exit(bContext *C, wmOperator *op)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
void CTX_wm_window_set(bContext *C, wmWindow *win)
bool ED_operator_object_active_objectmode(bContext *C)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
static void region_scale_draw_cb(const wmWindow *, void *userdata)
void WM_cursor_modal_set(wmWindow *win, int val)
bool BKE_regiontype_uses_category_tabs(const ARegionType *region_type)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
bool ED_operator_posemode(bContext *C)
AZone * ED_area_azones_update(ScrArea *area, const int mouse_xy[2])
wmWindow * WM_window_open(bContext *C, const char *title, const rcti *rect_unscaled, int space_type, bool toplevel, bool dialog, bool temp, eWindowAlignment alignment, void(*area_setup_fn)(bScreen *screen, ScrArea *area, void *user_data), void *area_setup_user_data)
bool ED_operator_areaactive(bContext *C)
bool ED_operator_editcurve(bContext *C)
static void area_dupli_fn(bScreen *, ScrArea *area, void *user_data)
const ActKeyColumn * ED_keylist_find_prev(const AnimKeylist *keylist, const float cfra)
bool ED_operator_spreadsheet_active(bContext *C)
static void SCREEN_OT_area_close(wmOperatorType *ot)
float ED_region_blend_alpha(ARegion *region)
static bool area_move_init(bContext *C, wmOperator *op, bool extend)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
static void area_actionzone_get_rect(AZone *az, rcti *r_rect)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
bool ED_operator_node_editable(bContext *C)
void BLI_rcti_init_minmax(struct rcti *rect)
void WM_operator_properties_border(wmOperatorType *ot)
AZone * ED_area_actionzone_find_xy(ScrArea *area, const int xy[2])
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
static bool scene_to_first_key_column_in_range(Scene *scene, const ScenePlaybackRange playback_range, KeyColumnIterator key_columns)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool ED_operator_region_gizmo_active(bContext *C)
bool ED_operator_file_active(bContext *C)
static void quadview_size_exit(wmOperator *op)
void summary_to_keylist(bAnimContext *ac, AnimKeylist *keylist, const int saction_flag, float2 range)
@ SCE_LOOP_MODE_STOP_START_FRAME
@ SCE_LOOP_MODE_STOP_END_FRAME
MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT
static wmOperatorStatus space_workspace_cycle_invoke(bContext *C, wmOperator *op, const wmEvent *)
wmWindow * CTX_wm_window(const bContext *C)
bool ED_operator_editcurve_3d(bContext *C)
ID * WM_drag_get_local_ID_or_import_from_asset(const bContext *C, const wmDrag *drag, int idcode)
bool ED_operator_outliner_active(bContext *C)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int WM_event_drag_threshold(const wmEvent *event)
bool ED_operator_editarmature(bContext *C)
MINLINE int max_ii(int a, int b)
static wmOperatorStatus screen_animation_step_invoke(bContext *C, wmOperator *, const wmEvent *event)
static void region_scale_exit(wmOperator *op)
static void SCREEN_OT_back_to_previous(wmOperatorType *ot)
bScreen * BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
static void SCREEN_OT_redo_last(wmOperatorType *ot)
bool ED_operator_editsurfcurve_region_view3d(bContext *C)
static AZone * area_actionzone_refresh_xy(ScrArea *area, const int xy[2], const bool test_only)
bool ANIM_nla_mapping_allowed(const bAnimListElem *ale)
bool ED_operator_asset_browsing_active(bContext *C)
bool ED_operator_outliner_active_no_editobject(bContext *C)
static void SCREEN_OT_area_join(wmOperatorType *ot)
static wmOperatorStatus frame_offset_exec(bContext *C, wmOperator *op)
void ED_region_tag_redraw(ARegion *region)
bool ED_operator_object_active_local_editable(bContext *C)
void ED_screen_animation_timer_remove(wmWindowManager *wm, wmWindow *win)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2)
static wmOperatorStatus spacedata_cleanup_exec(bContext *C, wmOperator *op)
static void keylist_from_graph_editor(bContext &C, AnimKeylist &keylist)
bool ED_operator_scene(bContext *C)
bool WM_drag_is_ID_type(const wmDrag *drag, int idcode)
static void SCREEN_OT_userpref_show(wmOperatorType *ot)
bool ED_operator_camera_poll(bContext *C)
bool ED_operator_sequencer_active_editable(bContext *C)
const ActKeyColumn * ED_keylist_find_next(const AnimKeylist *keylist, const float cfra)
static std::optional< int > find_marker_in_direction(const ListBaseT< TimeMarker > &markers, const int from_frame, const SearchDirection direction, const std::optional< ScenePlaybackRange > playback_range)
ARegion * BKE_area_region_copy(const SpaceType *st, const ARegion *region)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_scene_frame_set(Scene *scene, float frame)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
void BKE_scene_graph_evaluated_ensure(Depsgraph *depsgraph, Main *bmain)
double BKE_sound_sync_scene(Scene *scene)
void ED_scene_fps_average_accumulate(Scene *scene, short fps_samples, double ltime) ATTR_NONNULL(1)
wmOperatorStatus ED_screen_animation_play(bContext *C, int sync, int mode)
static int area_snap_calc_location(sAreaMoveData *md, const int delta)
static void SCREEN_OT_frame_jump(wmOperatorType *ot)
static void area_docking_apply(bContext *C, wmOperator *op)
WorkSpace * BKE_workspace_active_get(WorkSpaceInstanceHook *hook) GETTER_ATTRS
Object * ED_pose_object_from_context(bContext *C)
@ RGN_ALIGN_HIDE_WITH_PREV
ListBaseT< TimeMarker > * ED_scene_markers_get(const bContext *C, Scene *scene)
ScenePlaybackRange BKE_scene_get_playback_range(const Scene *scene)
static void SCREEN_OT_region_toggle(wmOperatorType *ot)
@ EVT_ACTIONZONE_FULLSCREEN
@ EVT_ACTIONZONE_REGION_QUAD
bool GPU_mem_stats_supported()
static void SCREEN_OT_region_blend(wmOperatorType *ot)
eRegionView3D_ViewLockQuad
static void quadview_size_cancel(bContext *C, wmOperator *op)
bool ED_operator_action_active(bContext *C)
bool RNA_property_enum_name_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_name)
static void SCREEN_OT_frame_offset(wmOperatorType *ot)
static bool area_dupli_poll(bContext *C)
void WM_draw_cb_exit(wmWindow *win, void *handle)
static void area_move_apply(bContext *C, wmOperator *op)
static void SCREEN_OT_area_dupli(wmOperatorType *ot)
static void context_cycle_prop_get(bScreen *screen, const ScrArea *area, PointerRNA *r_ptr, PropertyRNA **r_prop)
void ED_undo_grouped_push_op(bContext *C, wmOperator *op)
void SCREEN_OT_screenshot_area(wmOperatorType *ot)
static wmOperatorStatus userpref_show_exec(bContext *C, wmOperator *op)
static void region_scale_validate_size(RegionMoveData *rmd)
static void SCREEN_OT_region_context_menu(wmOperatorType *ot)
static wmOperatorStatus quadview_size_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus space_type_set_or_cycle_exec(bContext *C, wmOperator *op)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int ED_area_global_min_size_y(const ScrArea *area)
static void area_move_out_draw_cb(const wmWindow *win, void *userdata)
bool ED_operator_objectmode_poll_msg(bContext *C)
bool ED_operator_region_animview_active(bContext *C)
static void SCREEN_OT_region_scale(wmOperatorType *ot)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool ED_operator_editmesh(bContext *C)
void fcurve_to_keylist(AnimData *adt, FCurve *fcu, AnimKeylist *keylist, const int saction_flag, float2 range, const bool use_nla_remapping)
wmWindow * WM_window_find_by_area(wmWindowManager *wm, const ScrArea *area)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
static void SCREEN_OT_area_options(wmOperatorType *ot)
static bool azone_clipped_rect_calc(const AZone *az, rcti *r_rect_clip)
int BLI_rcti_length_y(const rcti *rect, int y)
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
bool ED_operator_sequencer_scene_editable(bContext *C)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
void WM_window_rect_calc(const wmWindow *win, rcti *r_rect)
static void region_scale_toggle_hidden(bContext *C, RegionMoveData *rmd, bool do_fade=false)
void WM_window_native_pixel_coords(const wmWindow *win, int *x, int *y)
static void area_move_exit(bContext *C, wmOperator *op)
void ED_region_visibility_change_update_animated(bContext *C, ScrArea *area, ARegion *region)
bool wm_cursor_position_get(wmWindow *win, int *r_x, int *r_y)
void BKE_icon_changed(int icon_id)
VecBase< int32_t, 2 > int2
static void SCREEN_OT_area_split(wmOperatorType *ot)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static wmOperatorStatus start_playback(bContext *C, int sync, int mode)
void ED_operatortypes_screen()
std::optional< PreScrubbingState > ED_screen_scrubbing_enable(bContext &C, bScreen &screen)
@ ASSET_IMPORT_APPEND_REUSE
@ ANIMFILTER_DATA_VISIBLE
static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
static wmOperatorStatus area_close_exec(bContext *C, wmOperator *op)
static bool repeat_history_poll(bContext *C)
bool ED_operator_object_active_from_view_layer(bContext *C)
static wmOperatorStatus screen_delete_exec(bContext *C, wmOperator *)
void grease_pencil_data_block_to_keylist(AnimData *adt, const GreasePencil *grease_pencil, AnimKeylist *keylist, const int saction_flag, const bool active_layer_only)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void copy_qt_qt(float q[4], const float a[4])
static ScrEdge * screen_area_edge_from_cursor(const bContext *C, const int cursor[2], ScrArea **r_sa1, ScrArea **r_sa2)
void DEG_id_tag_update(ID *id, unsigned int flags)
float BKE_scene_frame_get(const Scene *scene)
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
void BKE_report(ReportList *reports, eReportType type, const char *message)
@ SNAP_BIGGER_SMALLER_ONLY
@ SNAP_FRACTION_AND_ADJACENT
void BKE_sound_play_scene(Scene *scene)
static wmOperatorStatus actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
bool ED_operator_preferences_active(bContext *C)
Object * BKE_object_pose_armature_get(Object *ob)
static bool area_swap_init(wmOperator *op, const wmEvent *event)
static wmOperatorStatus area_move_exec(bContext *C, wmOperator *op)
static void SCREEN_OT_new(wmOperatorType *ot)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
static void region_blend_end(bContext *C, ARegion *region, const bool is_running)
wmWindowManager * CTX_wm_manager(const bContext *C)
wmOperatorStatus WM_operator_repeat(bContext *C, wmOperator *op)
void ED_region_remove(bContext *C, ScrArea *area, ARegion *region)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
static wmOperatorStatus region_toggle_exec(bContext *C, wmOperator *op)
bool ED_operator_object_active_only_from_view_layer(bContext *C)
static wmOperatorStatus region_blend_invoke(bContext *C, wmOperator *, const wmEvent *event)
Object * CTX_data_edit_object(const bContext *C)
@ SPACE_CONTEXT_CYCLE_NEXT
@ SPACE_CONTEXT_CYCLE_PREV
static wmOperatorStatus marker_jump_exec(bContext *C, wmOperator *op)
bool ED_operator_object_active_only(bContext *C)
static void SCREEN_OT_space_context_cycle(wmOperatorType *ot)
bool ED_operator_object_active_editable_obdata_from_view_layer_ex(bContext *C, short obtype)
void wm_window_close_request(bContext *C, wmWindowManager *wm, wmWindow *win)
static bool is_header_azone_location(ScrArea *area, const wmEvent *event)
static void keylist_fallback_for_keyframe_jump(bContext &C, Scene *scene, AnimKeylist &keylist)
static wmOperatorStatus area_split_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool ed_spacetype_test(bContext *C, int type)
static void screen_modal_action_begin()
bool ED_operator_posemode_context(bContext *C)
static wmOperatorStatus redo_last_invoke(bContext *C, wmOperator *, const wmEvent *)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
ScrEdge * screen_geom_area_map_find_active_scredge(const ScrAreaMap *area_map, const rcti *bounds_rect, const int mx, const int my, int safety)
void screen_draw_dock_preview(const wmWindow *win, ScrArea *source, ScrArea *target, AreaDockTarget dock_target, float factor, int x, int y, float anim_factor)
MaskLayer * BKE_mask_layer_active(Mask *mask)
static wmOperatorStatus project_settings_show_exec(bContext *C, wmOperator *op)
static bool screen_animation_region_supports_time_follow(eSpace_Type spacetype, eRegion_Type regiontype)
static wmOperatorStatus screen_set_exec(bContext *C, wmOperator *op)
bool ED_operator_sequencer_scene(bContext *C)
void WM_cursor_modal_restore(wmWindow *win)
bool ED_operator_region_info_active(bContext *C)
void WM_operator_free_all_after(wmWindowManager *wm, wmOperator *op)
static bool space_type_set_or_cycle_poll(bContext *C)
void ED_keylist_prepare_for_direct_access(AnimKeylist *keylist)
bool ED_operator_editable_mesh(bContext *C)
static wmOperatorStatus drivers_editor_show_exec(bContext *C, wmOperator *op)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
bool ED_operator_editsurfcurve(bContext *C)
@ WM_TIMER_TAGGED_FOR_REMOVAL
static wmOperatorStatus area_swap_exec(bContext *C, wmOperator *op)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
static wmOperatorStatus area_split_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool ED_operator_regionactive(bContext *C)
static bool area_split_init(bContext *C, wmOperator *op)
bool ED_operator_console_active(bContext *C)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
wmOperatorStatus WM_operator_redo_popup(bContext *C, wmOperator *op)
SpaceNode * CTX_wm_space_node(const bContext *C)
bool ED_operator_view3d_active(bContext *C)
AnimKeylist * ED_keylist_create()
static void area_split_cancel(bContext *C, wmOperator *op)
ScrEdge * BKE_screen_find_edge(const bScreen *screen, ScrVert *v1, ScrVert *v2)
bool screen_geom_edge_is_horizontal(ScrEdge *se)
Mask * CTX_data_edit_mask(const bContext *C)
void ED_screens_header_tools_menu_create(bContext *C, ui::Layout *layout, void *arg)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
bool ED_operator_object_active(bContext *C)
static bool area_split_menu_init(bContext *C, wmOperator *op)
static wmOperatorStatus screen_new_exec(bContext *C, wmOperator *)
bool ED_workspace_layout_cycle(WorkSpace *workspace, short direction, bContext *C) ATTR_NONNULL()
static void fullscreen_click_rcti_init(rcti *rect, const short, const short, const short x2, const short y2)
static wmOperatorStatus region_scale_modal(bContext *C, wmOperator *op, const wmEvent *event)
static ScrEdge * area_findsharededge(bScreen *screen, ScrArea *area, ScrArea *sb)
eRegionView3D_View ED_view3d_lock_view_from_index(int index)
Vector< ID * > BKE_id_ordered_list(const ListBaseT< ID > *lb)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
static void area_join_update_data(bContext *C, sAreaJoinData *jd, const wmEvent *event)
ScrArea * ED_screen_temp_space_open(bContext *C, const char *title, eSpace_Type space_type, int display_type, bool dialog) ATTR_NONNULL(1)
bool ED_operator_object_active_local_editable_posemode_exclusive(bContext *C)
void ED_region_toggle_hidden(bContext *C, ARegion *region)
bool ED_operator_object_active_editable(bContext *C)
void area_getoffsets(ScrArea *sa_a, ScrArea *sa_b, const eScreenDir dir, int *r_offset1, int *r_offset2)
static void actionzone_exit(wmOperator *op)
static wmOperatorStatus frame_jump_exec(bContext *C, wmOperator *op)
static bool region_flip_poll(bContext *C)
ScrArea ScrArea * BKE_screen_find_area_xy(const bScreen *screen, int spacetype, const int xy[2]) ATTR_NONNULL(1
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
static void area_split_exit(bContext *C, wmOperator *op)
static void region_scale_apply_stack(RegionMoveData *rmd, const wmEvent *event, const int size_no_snap, const float aspect)
bool ED_operator_objectmode_with_view3d_poll_msg(bContext *C)
static wmOperatorStatus area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
void ED_view3d_quadview_update(ScrArea *area, ARegion *region, bool do_clip)
bool ED_operator_region_file_active(bContext *C)
void BKE_sound_init(Main *bmain)
static void actionzone_cancel(bContext *, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool ED_operator_uvedit_space_image(bContext *C)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
void ob_to_keylist(bDopeSheet *ads, Object *ob, AnimKeylist *keylist, const int saction_flag, float2 range)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
static wmOperatorStatus region_scale_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool ED_operator_screenactive_nobackground(bContext *C)
bool ED_operator_editfont(bContext *C)
@ SCER_WRAP_TIMELINE_NAVIGATION
static void area_join_cancel(bContext *C, wmOperator *op)
void scene_to_keylist(bDopeSheet *ads, Scene *sce, AnimKeylist *keylist, const int saction_flag, float2 range)
void BKE_spacedata_freelist(ListBaseT< SpaceLink > *lb)
void ED_reset_audio_device(bContext *C)
wmWindow * WM_window_open_temp(bContext *C, const char *title, int space_type, bool dialog)
bool ED_fileselect_is_file_browser(const SpaceFile *sfile)
int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
void screen_geom_select_connected_edge(const wmWindow *win, ScrEdge *edge)
bool ED_operator_uvmap(bContext *C)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
static void SCREEN_OT_drivers_editor_show(wmOperatorType *ot)
int WM_drag_get_path_file_type(const wmDrag *drag)
static wmOperatorStatus area_swap_invoke(bContext *C, wmOperator *op, const wmEvent *event)
ScrArea * ED_area_find_under_cursor(const bContext *C, int spacetype, const int event_xy[2])
void ED_region_visibility_change_update(bContext *C, ScrArea *area, ARegion *region)
bool ED_operator_region_action_active(bContext *C)
static void area_move_apply_do(bContext *C, int delta, sAreaMoveData *md)
wmEvent * WM_event_add(wmWindow *win, const wmEvent *event_to_add)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
const EnumPropertyItem rna_enum_region_type_items[]
SpaceImage * CTX_wm_space_image(const bContext *C)
static void area_join_exit(bContext *C, wmOperator *op)
SpaceLink * CTX_wm_space_data(const bContext *C)
static bool area_split_allowed(const ScrArea *area, const eScreenAxis dir_axis)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
wmOperatorStatus WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
Mesh * ED_mesh_context(bContext *C)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
bScreen * ED_screen_animation_no_scrub(const wmWindowManager *wm)
void ED_areas_do_frame_follow(bContext *C, bool center_view)
void ED_update_for_newframe(Main *bmain, Depsgraph *depsgraph)
static float area_split_factor(bContext *C, sAreaJoinData *jd, const wmEvent *event)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void screen_animate_area_highlight(wmWindow *win, bScreen *screen, const rcti *rect, float inner[4], float outline[4], float seconds)
const EnumPropertyItem rna_enum_preference_section_items[]
bool ED_operator_objectmode(bContext *C)
bool ED_view3d_lock(RegionView3D *rv3d)
static void SCREEN_OT_time_jump(wmOperatorType *ot)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
static void screen_modal_action_end()
@ USER_TEMP_SPACE_DISPLAY_WINDOW
static void area_move_set_limits(wmWindow *win, bScreen *screen, const eScreenAxis dir_axis, int *bigger, int *smaller, bool *use_bigger_smaller_snap)
bool WM_operator_winactive(bContext *C)
static bool is_split_edge(const int alignment, const AZEdge edge)
static int area_join_cursor(sAreaJoinData *jd, const wmEvent *event)
void ED_screen_full_prevspace(bContext *C, ScrArea *area)
void ED_area_init(bContext *C, const wmWindow *win, ScrArea *area)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Main * CTX_data_main(const bContext *C)
static void SCREEN_OT_area_move(wmOperatorType *ot)
static bool screen_drop_scene_poll(bContext *C, wmDrag *drag, const wmEvent *)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
bool ED_operator_posemode_local(bContext *C)
static ScrArea * screen_actionzone_area(bScreen *screen, const AZone *az)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
static void SCREEN_OT_repeat_history(wmOperatorType *ot)
void screen_geom_select_extended_edge(const wmWindow *win, ScrEdge *edge)
static void SCREEN_OT_region_quadview(wmOperatorType *ot)
static void area_move_cancel(bContext *C, wmOperator *op)
bool ED_operator_active_screen_and_scene(bContext *C)
static const EnumPropertyItem space_context_cycle_direction[]
int ED_area_global_max_size_y(const ScrArea *area)
void WM_window_title_refresh(wmWindowManager *wm, wmWindow *win)
static void SCREEN_OT_animation_play(wmOperatorType *ot)
void ANIM_animdata_freelist(ListBaseT< bAnimListElem > *anim_data)
static void area_split_preview_update_cursor(bContext *C, wmOperator *op)
static int wrap_frame_in_range(const int frame, const ScenePlaybackRange &range)
static wmOperatorStatus space_context_cycle_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool blend_file_drop_poll(bContext *, wmDrag *drag, const wmEvent *)
@ ANIMPLAY_FLAG_USE_NEXT_FRAME
static wmOperatorStatus area_move_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wmWindow * ED_window_animation_playing_no_scrub(const wmWindowManager *wm)
bool ED_operator_region_view3d_active(bContext *C)
static wmOperatorStatus area_edge_merge_exec(bContext *C, wmOperator *op)
static std::string userpref_show_get_description(bContext *C, wmOperatorType *, PointerRNA *ptr)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
void ED_drivers_editor_init(bContext *C, ScrArea *area)
bool ED_operator_screen_mainwinactive(bContext *C)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
static wmOperatorStatus frame_jump_delta_exec(bContext *C, wmOperator *op)
bool ED_operator_info_active(bContext *C)
bool ED_operator_editmesh_region_view3d(bContext *C)
Scene * ED_screen_find_playing_scene(const bScreen *screen, bool scrub=false)
@ FILE_TYPE_BLENDER_BACKUP
static void SCREEN_OT_repeat_last(wmOperatorType *ot)
void screen_draw_join_highlight(const wmWindow *win, ScrArea *sa1, ScrArea *sa2, eScreenDir dir, float anim_factor)
wmOperator * WM_operator_last_redo(const bContext *C)
bool WM_operator_repeat_check(const bContext *, wmOperator *op)
const BMesh * BKE_editmesh_bmesh_get(const Object *ob)
void BKE_sound_stop_scene(Scene *scene)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
double BLI_time_now_seconds()
void mask_to_keylist(bDopeSheet *, MaskLayer *masklay, AnimKeylist *keylist)
static void screen_area_touch_menu_create(bContext *C, ScrArea *area)
void ED_view3d_lastview_store(RegionView3D *rv3d)
WorkSpaceLayout * BKE_workspace_active_layout_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
void ED_keylist_free(AnimKeylist *keylist)
static wmOperatorStatus screen_animation_cancel_exec(bContext *C, wmOperator *op)
SpaceFile * CTX_wm_space_file(const bContext *C)
static void SCREEN_OT_area_swap(wmOperatorType *ot)
static bool area_join_poll(bContext *C)
bool void ED_scene_fps_average_clear(Scene *scene) ATTR_NONNULL(1)
static wmOperatorStatus screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Scene * CTX_data_scene(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_region_set(bContext *C, ARegion *region)
void WM_cursor_set(wmWindow *win, int curs)
int screen_geom_area_height(const ScrArea *area)
void WM_event_modal_handler_region_replace(wmWindow *win, const ARegion *old_region, ARegion *new_region)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
bool ED_operator_editmesh_view3d(bContext *C)
void ED_screens_region_flip_menu_create(bContext *C, ui::Layout *layout, void *arg)
Depsgraph * BKE_scene_ensure_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer)
static bool match_region_with_redraws(const ScrArea *area, eRegion_Type regiontype, eScreen_Redraws_Flag redraws, bool from_anim_edit)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
static wmOperatorStatus area_join_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@ OPTYPE_DEPENDS_ON_CURSOR
@ RGN_FLAG_NO_USER_RESIZE
@ RGN_FLAG_HIDDEN_BY_USER
@ RGN_FLAG_RESIZE_RESPECT_BUTTON_SECTIONS
static void SCREEN_OT_project_settings_show(wmOperatorType *ot)
static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
void ED_screen_scrubbing_disable(bContext &C, bScreen &screen, const std::optional< PreScrubbingState > &resume)
FCurve * BKE_fcurve_find_by_rna_context_ui(bContext *C, const PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_animdata, bAction **r_action, bool *r_driven, bool *r_special)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
const ListBaseT< ActKeyColumn > * ED_keylist_listbase(const AnimKeylist *keylist)
static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
static bool area_join_init(bContext *C, wmOperator *op, ScrArea *sa1, ScrArea *sa2)
static bool keyframe_jump_poll(bContext *C)
bool ED_operator_sequencer_active(bContext *C)
static bool area_dupli_open(bContext *C, ScrArea *area, const int2 position)
static wmOperatorStatus screen_maximize_area_exec(bContext *C, wmOperator *op)
static void area_join_dock_cb(const wmWindow *win, void *userdata)
void * WM_draw_cb_activate(wmWindow *win, void(*draw)(const wmWindow *win, void *customdata), void *customdata)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static wmOperatorStatus repeat_history_invoke(bContext *C, wmOperator *op, const wmEvent *)
ListBaseT< wmDropBox > * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
static bool actionzone_area_poll(bContext *C)
bool ED_operator_editsurf(bContext *C)
void ED_buttons_visible_tabs_menu(bContext *C, ui::Layout *layout, void *)
void region_toggle_hidden(bContext *C, ARegion *region, const bool do_fade)
static void SCREEN_OT_quadview_size(wmOperatorType *ot)
static bool area_has_scrubbing_snap(ScrArea *area)
void WM_event_add_mousemove(wmWindow *win)
static void screen_drop_scene_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
bool ED_operator_object_active_editable_mesh_from_view_layer(bContext *C)
bool ED_operator_region_outliner_active(bContext *C)
bool ED_operator_image_active(bContext *C)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
static wmOperatorStatus area_split_exec(bContext *C, wmOperator *op)
ViewLayer * BKE_view_layer_default_render(const Scene *scene)
bool ED_operator_object_active_editable_mesh(bContext *C)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
static bool operator_screenactive_norender(bContext *C)
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)
static void ed_screens_statusbar_menu_create(ui::Layout &layout, void *)
static void area_join_draw_cb(const wmWindow *win, void *userdata)
bScreen * WM_window_get_active_screen(const wmWindow *win)
static wmOperatorStatus keyframe_jump_exec(bContext *C, wmOperator *op)
static void region_blend_invalidate_visible_rect(ScrArea *area)
MINLINE int min_ii(int a, int b)
bool ED_operator_editmball(bContext *C)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
Object * CTX_data_active_object(const bContext *C)
static void SCREEN_OT_delete(wmOperatorType *ot)
static void blend_file_drop_copy(bContext *, wmDrag *drag, wmDropBox *drop)
void screen_draw_move_highlight(const wmWindow *win, bScreen *screen, eScreenAxis dir_axis, float anim_factor)
static float area_docking_snap(const float pos, const wmEvent *event)
ARegion * CTX_wm_region(const bContext *C)
bool ED_operator_object_active_editable_ex(bContext *C, const Object *ob)
void ED_workspace_status_text(bContext *C, const char *str)
static void stop_playback(bContext *C)
void SCREEN_OT_screenshot(wmOperatorType *ot)
void ED_region_tag_redraw_no_rebuild(ARegion *region)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
static wmOperatorStatus fullscreen_back_exec(bContext *C, wmOperator *op)
bool ED_operator_region_graphedit_active(bContext *C)
static void area_join_dock_cb_window(sAreaJoinData *jd, wmOperator *op)
static std::string screen_drop_scene_tooltip(bContext *, wmDrag *drag, const int[2], wmDropBox *)
float RNA_float_get(PointerRNA *ptr, const char *name)
static void SCREEN_OT_space_type_set_or_cycle(wmOperatorType *ot)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
wmOperatorStatus WM_operator_repeat_last(bContext *C, wmOperator *op)
WorkSpaceLayout * BKE_workspace_layout_find(const WorkSpace *workspace, const bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void BLI_rcti_do_minmax_rcti(struct rcti *rect, const struct rcti *other)
void wm_event_init_from_window(wmWindow *win, wmEvent *event)
static void SCREEN_OT_header_toggle_menus(wmOperatorType *ot)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
static void region_scale_cancel(bContext *, wmOperator *op)
static wmOperatorStatus header_toggle_menus_exec(bContext *C, wmOperator *)
static bool area_move_reinit(bContext *C, wmOperator *op, bool extend, const int xy[2])
static void area_move_draw_cb(const wmWindow *win, void *userdata)
static bool ed_object_hidden(const Object *ob)
void BKE_screen_remove_double_scredges(bScreen *screen)
bool WM_window_is_temp_screen(const wmWindow *win)
@ AREA_FLAG_REGION_SIZE_UPDATE
@ AREA_FLAG_ACTIONZONES_UPDATE
bool ED_area_is_global(const ScrArea *area)
bool ED_operator_screenactive(bContext *C)
static bool ed_operator_posemode_exclusive_ex(bContext *C, Object *obact)
static wmOperatorStatus region_quadview_exec(bContext *C, wmOperator *op)
void screen_geom_edge_aligned_merge(const wmWindow *win, ScrEdge *edge)
void screen_draw_region_scale_highlight(ARegion *region)
static wmOperatorStatus quadview_size_modal(bContext *C, wmOperator *op, const wmEvent *event)
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_file_browsing_active(bContext *C)
static AreaDockTarget area_docking_target(sAreaJoinData *jd, const wmEvent *event)
static wmOperatorStatus area_join_exec(bContext *C, wmOperator *op)
static bool area_has_playback_snap(ScrArea *area)
void void BLI_INLINE bool BLI_listbase_is_single(const ListBase *lb)
void CTX_wm_area_set(bContext *C, ScrArea *area)
bool BKE_object_pose_context_check(const Object *ob)
static void area_split_draw_cb(const wmWindow *, void *userdata)
static wmOperatorStatus area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
#define AREA_DOCK_FADEOUT
#define AREA_MOVE_LINE_FADEIN
#define SCREEN_DIR_IS_VERTICAL(dir)
#define AREA_SPLIT_FADEOUT
#define AREA_CLOSE_FADEOUT
#define AREA_JOIN_FADEOUT
#define AREA_MOVE_LINE_FADEOUT
#define KM_MODAL_SNAP_OFF
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
void(*) on_user_resize(const ARegion *region)
int(*) snap_size(const ARegion *region, int size, int axis)
bke::ARegionRuntime * runtime
eRegion_Alignment alignment
eAssetImportMethod method
ListBaseT< WorkSpace > workspaces
ListBaseT< bScreen > screens
eObject_VisibilityFlag visibility_flag
PlaybackDirection play_mode
eRegionView3D_ViewLockQuad viewlock_quad
struct RegionView3D * localvd
eRegionView3D_ViewAxisRoll view_axis_roll
eRegionView3D_ViewLock runtime_viewlock
eRegionView3D_Persp persp
eRegionView3D_ViewLock viewlock
bool contains(const int frame) const
eScenePlaybackLoopMode playback_loop_mode
ListBaseT< ScrArea > areabase
ListBaseT< struct AZone > actionzones
ListBaseT< ARegion > regionbase
short butspacetype_subtype
ListBaseT< SpaceLink > spacedata
ScrGlobalAreaData * global
double lagging_frame_count
struct bNodeTree * edittree
WorkSpace * temp_workspace_store
eDopeSheet_FilterFlag filterflag
struct wmTimer * animtimer
struct ARegion * active_region
ListBaseT< struct ScrVert > vertbase
ListBaseT< struct ScrArea > areabase
eScreen_Redraws_Flag redraws_flag
struct ARegionType * type
AreaDockTarget dock_target
void * draw_dock_callback
AreaMoveSnapType snap_type
void operator_context_set(wm::OpCallContext opcontext)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void active_set(bool active)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void menu_fn(StringRefNull name, int icon, MenuCreateFunc func, void *arg)
AssetImportSettings import_settings
wmEventModifierFlag modifier
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
struct ReportList * reports
struct wmOperatorType * type
bke::WindowRuntime * runtime
struct WorkSpaceInstanceHook * workspace_hook