File: ShaderFlow/Scene.py
¶
ShaderFlow.Scene ¶
WindowBackend ¶
Bases: BrokenEnum
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
infer ¶
infer() -> Self
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
72 73 74 75 76 77 78 79 80 81 82 83 |
|
Exporting ¶
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
|
update ¶
update() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
102 103 104 105 106 107 |
|
ffmpeg_clean ¶
ffmpeg_clean() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
115 116 |
|
ffmpeg_sizes ¶
ffmpeg_sizes(width: int, height: int) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
118 119 120 121 122 |
|
ffmpeg_output ¶
ffmpeg_output(
base: str, output: str, format: str, _started: str
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
125 126 127 128 129 130 131 132 |
|
ffhook ¶
ffhook() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
136 137 138 |
|
popen ¶
popen() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
make_buffers ¶
make_buffers(n: int = 2) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
160 161 |
|
release_buffers ¶
release_buffers() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
163 164 165 |
|
pipe ¶
pipe(noturbo: bool = False) -> None
Write a new frame to FFmpeg
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
finish ¶
finish() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
197 198 199 200 201 202 203 204 205 206 207 208 |
|
log_stats ¶
log_stats(output: Path) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
210 211 212 213 214 215 216 217 218 |
|
ShaderScene ¶
Bases: ShaderModule
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
|
Config ¶
Bases: BrokenModel
A class that contains all specific configurations of the scene
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
228 229 230 |
|
modules ¶
modules: deque[ShaderModule] = Factory(deque)
List of all Modules on the Scene, in order of addition (including the Scene itself)
ffmpeg ¶
ffmpeg: BrokenFFmpeg = Factory(BrokenFFmpeg)
FFmpeg configuration for exporting (encoding) videos
shader ¶
shader: ShaderProgram = None
The main ShaderObject of the Scene, the visible content of the Window
subsample ¶
subsample: int = field(
default=2, converter=lambda x: int(max(1, x))
)
The kernel size of the final SSAA downsample
quality ¶
quality: float = field(
default=50.0,
converter=lambda x: clamp(float(x), 0.0, 100.0),
)
Visual quality level (0-100%), if implemented on the Shader/Scene
cli ¶
cli: BrokenTyper = Factory(lambda: BrokenTyper(chain=True))
This Scene's BrokenTyper instance for the CLI. Commands are added by any module in the self.commands
method. The self.main
is always added to it
__post__ ¶
__post__()
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
293 294 295 296 297 298 299 |
|
__del__ ¶
__del__()
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
333 334 335 336 337 338 339 340 341 342 343 344 |
|
time ¶
time: Seconds = field(default=0.0, converter=float)
Current virtual time of the scene. Everything should depend on it for flexibility
speed ¶
speed: float = Factory(
lambda: DynamicNumber(value=1, frequency=3)
)
Time scale factor, used for dt
, which integrates to time
runtime ¶
runtime: Seconds = field(default=10.0, converter=float)
Total duration of the scene, set by user or longest module
dt ¶
dt: Seconds = field(default=0.0, converter=float)
Virtual delta time since last frame, time scaled by speed
. Use self.rdt
for real delta
rdt ¶
rdt: Seconds = field(default=0.0, converter=float)
Real life, physical delta time since last frame. Use self.dt
for virtual scaled version
set_duration ¶
Either force the duration, find the longest module or use base duration
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
413 414 415 416 417 |
|
title ¶
title: str = field(
default="ShaderFlow", on_setattr=_window_proxy
)
Realtime window 'title' property
resizable ¶
resizable: bool = field(
default=True, on_setattr=_window_proxy
)
Realtime window 'is resizable' property
fullscreen ¶
fullscreen: bool = field(
default=False, on_setattr=_window_proxy
)
Realtime window 'is fullscreen' property
exclusive ¶
exclusive: bool = field(
default=False, on_setattr=_window_proxy
)
Realtime window 'mouse exclusivity' property
visible ¶
visible: bool = field(
default=False, on_setattr=_window_proxy
)
Realtime window 'is visible' property
monitor ¶
monitor: int = field(
default=Environment.int("MONITOR", 0), converter=int
)
Monitor index to base the window parameters on
monitor_framerate ¶
monitor_framerate: float
Note: Defaults to 60 if no monitor is found or non-real time
ssaa ¶
ssaa: float
(Fractional) Super Sampling Anti-Aliasing (SSAA) factor 1
Render in a virtual resolution of this multiplier, then resample to the original resolution - Values higher than 1 improves the image quality, maximum visual quality at 2 - Significant GPU cost of O(N^2): quadruples the GPU use at 2, or 25% at 0.5
-
https://en.wikipedia.org/wiki/Supersampling (Uniform grid distribution) ↩
render_resolution ¶
render_resolution: tuple[int, int]
Internal true rendering resolution with SSAA applied
aspect_ratio ¶
aspect_ratio: float
Either the forced self._aspect_ratio
or dynamic from self.width/self.height
. When set and resizing, the logic of BrokenResolution.fit
is applied to enforce ratios
resize ¶
resize(
width: Union[int, float] = Unchanged,
height: Union[int, float] = Unchanged,
*,
ratio: Union[Unchanged, float, str] = Unchanged,
bounds: tuple[int, int] = Unchanged,
scale: float = Unchanged,
ssaa: float = Unchanged
) -> tuple[int, int]
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
|
backend ¶
backend: WindowBackend = Factory(
lambda: WindowBackend.infer()
)
The ModernGL Window Backend. Cannot be changed after creation. Can also be set with the environment variable WINDOW_BACKEND=<backend>
, where backend = {glfw, headless}
opengl ¶
opengl: moderngl.Context = None
ModernGL Context of this Scene. The thread accessing this MUST own or ENTER its context for creating, changing, deleting objects; more often than not, it's the Main thread
window ¶
window: ModernglWindow = None
ModernGL Window instance at site-packages/moderngl_window.context.<self.backend>.Window
init_window ¶
init_window() -> None
Create the window and the OpenGL context
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
|
screenshot ¶
screenshot() -> numpy.ndarray
Take a screenshot of the screen and return a numpy array with the data
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
711 712 713 714 715 |
|
directory ¶
directory: Path
Path of the current Scene file Python script. This works by searching up the call stack for the first context whose filename isn't the local file (of ShaderFlow.Scene)
read_file ¶
read_file(
file: Path, *, bytes: bool = False
) -> Union[str, bytes]
Read a file relative to the current Scene Python script
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
729 730 731 732 733 |
|
scheduler ¶
scheduler: BrokenScheduler = Factory(BrokenScheduler)
Scheduler for the Scene, handles all the tasks and their execution
vsync ¶
vsync: SchedulerTask = None
Task for the Scene's main event loop, the rendering of the next frame
quit ¶
quit: PlainTracker = Factory(lambda: PlainTracker(False))
Should the scene end the main event loop? Use as if scene.quit():
next ¶
next(dt: float = 0.0) -> None
Integrate time, update all modules and render the next frame
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 |
|
freewheel ¶
freewheel: bool = False
'Not realtime' mode: Either Exporting, Rendering or Benchmarking
loop ¶
loop: int = field(default=1, converter=int)
Number of times to loop the exported video. One 1 keeps original, two 2 doubles the length. Ideally have seamless transitions on the shader based on self.tau and/or/no audio input
export_name ¶
export_name(path: Path) -> Path
Change the video file name being exported based on the current batch index. By default, the name is unchanged in single export, else the stem is appended with the batch index
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
796 797 798 799 800 801 802 |
|
main ¶
main(
width: Annotated[
int,
Option(
"--width",
"-w",
help="[bold red ](🔴 Basic )[/] Width of the rendering resolution [medium_purple3](None to keep or find by --ar aspect ratio)[/] [dim](1920 on init)[/]",
),
] = None,
height: Annotated[
int,
Option(
"--height",
"-h",
help="[bold red ](🔴 Basic )[/] Height of the rendering resolution [medium_purple3](None to keep or find by --ar aspect ratio)[/] [dim](1080 on init)[/]",
),
] = None,
fps: Annotated[
float,
Option(
"--fps",
"-f",
help="[bold red ](🔴 Basic )[/] Target frames per second [medium_purple3](Defaults to the monitor framerate on realtime else 60)[/]",
),
] = None,
scale: Annotated[
float,
Option(
"--scale",
"-x",
help="[bold red ](🔴 Basic )[/] Post-multiply width and height by a scale factor [medium_purple3](None to keep)[/] [dim](1.0 on init)[/]",
),
] = None,
ratio: Annotated[
str,
Option(
"--ar",
"-X",
help="[bold red ](🔴 Basic )[/] Force resolution aspect ratio [green](Examples: '16:9', '16/9', '1.777')[/] [medium_purple3](None for dynamic)[/]",
),
] = None,
noskip: Annotated[
bool,
Option(
"--no-skip",
help="[bold red ](🔴 Window )[/] [dim]No frames are skipped if the rendering is behind schedule [medium_purple3](Limits maximum dt to 1/fps)[/]",
),
] = False,
fullscreen: Annotated[
bool,
Option(
"--fullscreen",
help="[bold red ](🔴 Window )[/] [dim]Start the realtime window in fullscreen mode [medium_purple3](Toggle with F11)[/]",
),
] = False,
maximize: Annotated[
bool,
Option(
"--maximize",
"-M",
help="[bold red ](🔴 Window )[/] [dim]Start the realtime window in maximized mode",
),
] = False,
quality: Annotated[
float,
Option(
"--quality",
"-q",
help="[bold yellow](🟡 Quality)[/] Global quality level [green](0-100%)[/] [yellow](If implemented on the scene/shader)[/] [medium_purple3](None to keep, default 50%)[/]",
),
] = None,
ssaa: Annotated[
float,
Option(
"--ssaa",
"-s",
help="[bold yellow](🟡 Quality)[/] Super sampling anti aliasing factor [green](0-4)[/] [yellow](N^2 GPU cost)[/] [medium_purple3](None to keep, default 1)[/]",
),
] = None,
subsample: Annotated[
int,
Option(
"--subsample",
help="[bold yellow](🟡 Quality)[/] Subpixel downsample kernel size for the final SSAA [green](1-4)[/] [medium_purple3](None to keep, default 2)[/]",
),
] = None,
render: Annotated[
bool,
Option(
"--render",
"-r",
help="[bold green ](🟢 Export )[/] Export the Scene to a video file defined on --output [dim](Implicit if present)[/]",
),
] = False,
time: Annotated[
str,
Option(
"--time",
"-t",
help="[bold green ](🟢 Export )[/] Total length of the exported video [dim](Loop duration)[/] [medium_purple3](None to keep, default 10 or longest module)[/]",
),
] = None,
output: Annotated[
str,
Option(
"--output",
"-o",
help="[bold green ](🟢 Export )[/] Output video file name [green]('absolute', 'relative', 'plain' path)[/] [dim]($base/$(plain or $scene-$date))[/]",
),
] = None,
format: Annotated[
str,
Option(
"--format",
"-F",
help="[bold green ](🟢 Export )[/] Output video container [green]('mp4', 'mkv', 'webm', 'avi, '...')[/] [yellow](--output one is prioritized)[/]",
),
] = None,
base: Annotated[
Path,
Option(
"--base",
"-D",
help="[bold green ](🟢 Export )[/] Export base directory [medium_purple3](If plain name)[/]",
),
] = Broken.PROJECT.DIRECTORIES.DATA,
start: Annotated[
float,
Option(
"--start",
"-T",
help="[bold green ](🟢 Export )[/] Start time offset of the exported video [yellow](Time is shifted by this)[/] [medium_purple3](None to keep)[/] [dim](0 on init)[/]",
),
] = None,
speed: Annotated[
float,
Option(
"--speed",
"-S",
help="[bold green ](🟢 Export )[/] Time speed factor of the scene [yellow](Duration is stretched by 1/speed)[/] [medium_purple3](None to keep)[/] [dim](1 on init)[/]",
),
] = None,
batch: Annotated[
str,
Option(
"--batch",
"-b",
help="[bold green ](🟢 Export )[/] Hyphenated indices range to export multiple videos, if implemented [medium_purple3](1,5-7,10)[/medium_purple3]",
),
] = "0",
loop: Annotated[
int,
Option(
"--loop",
"-l",
help="[bold blue ](🔵 Special)[/] Exported videos loop copies [yellow](Final duration is multiplied by this)[/] [dim](1 on init)[/]",
),
] = None,
freewheel: Annotated[
bool,
Option(
"--freewheel",
help="[bold blue ](🔵 Special)[/] Unlock the Scene's event loop framerate, implicit when exporting [medium_purple3](Use SKIP_GPU=1 for CPU only benchmark)[/]",
),
] = False,
raw: Annotated[
bool,
Option(
"--raw",
help="[bold blue ](🔵 Special)[/] Send raw OpenGL frames before GPU SSAA to FFmpeg [medium_purple3](Enabled if SSAA<1)[/] [dim](CPU Downsampling)[/]",
),
] = False,
open: Annotated[
bool,
Option(
"--open",
help="[bold blue ](🔵 Special)[/] Open the directory where the video was saved after finishing rendering",
),
] = False,
relaxed: Annotated[
bool,
Option(
"--relaxed",
help="[bold blue ](🔵 Special)[/] [dim]Use a relaxed but lower CPU overhead frametime sleep function on realtime mode",
),
] = False,
buffers: Annotated[
int,
Option(
"--buffers",
"-N",
help="[bold blue ](🔵 Turbo )[/] [dim]Maximum number of pre-rendered frames to be piped into FFmpeg[/dim]",
),
] = 3,
noturbo: Annotated[
bool,
Option(
"--no-turbo",
help="[bold blue ](🔵 Turbo )[/] [dim]Disables [steel_blue1][link=https://github.com/BrokenSource/TurboPipe]TurboPipe[/link][/steel_blue1] fast exporting, may fix segfaults on older hardware[/dim]",
),
] = False,
progress: Annotated[
Optional[Callable[[int, int], None]],
BrokenTyper.exclude(),
] = None,
bounds: Annotated[
Optional[tuple[int, int]], BrokenTyper.exclude()
] = None,
_initial: Annotated[
tuple[int, int], BrokenTyper.exclude()
] = None,
_index: Annotated[int, BrokenTyper.exclude()] = None,
_started: Annotated[str, BrokenTyper.exclude()] = None,
_outputs: Annotated[Path, BrokenTyper.exclude()] = None,
) -> Optional[list[Path]]
Main event loop of the scene
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 |
|
handle ¶
handle(message: ShaderMessage) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
|
pipeline ¶
pipeline() -> Iterable[ShaderVariable]
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 |
|
__window_resize__ ¶
__window_resize__(width: int, height: int) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1018 1019 1020 1021 1022 1023 1024 1025 1026 |
|
__window_close__ ¶
__window_close__() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1028 1029 |
|
__window_iconify__ ¶
__window_iconify__(state: bool) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1031 1032 |
|
__window_files_dropped_event__ ¶
__window_files_dropped_event__(
window, files: list[str]
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1034 1035 |
|
__window_key_event__ ¶
__window_key_event__(
key: int, action: int, modifiers: int
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1039 1040 1041 1042 1043 1044 1045 1046 1047 |
|
__window_unicode_char_entered__ ¶
__window_unicode_char_entered__(char: str) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1049 1050 1051 1052 |
|
__xy2uv__ ¶
__xy2uv__(x: int = 0, y: int = 0) -> dict[str, float]
Convert a XY pixel coordinate into a Center-UV normalized coordinate
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1058 1059 1060 1061 1062 1063 1064 |
|
__dxdy2dudv__ ¶
__dxdy2dudv__(dx: int = 0, dy: int = 0) -> dict[str, float]
Convert a dx dy pixel coordinate into a Center-UV normalized coordinate
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1066 1067 1068 1069 1070 1071 1072 |
|
__window_mouse_press_event__ ¶
__window_mouse_press_event__(
x: int, y: int, button: int
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1076 1077 1078 1079 1080 1081 1082 1083 1084 |
|
__window_mouse_release_event__ ¶
__window_mouse_release_event__(
x: int, y: int, button: int
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1086 1087 1088 1089 1090 1091 1092 1093 1094 |
|
__window_mouse_enter_event__ ¶
__window_mouse_enter_event__(window, inside: bool) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1098 1099 1100 |
|
__window_mouse_scroll_event__ ¶
__window_mouse_scroll_event__(dx: int, dy: int) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
|
__window_mouse_position_event__ ¶
__window_mouse_position_event__(
x: int, y: int, dx: int, dy: int
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1113 1114 1115 1116 1117 1118 1119 1120 |
|
__window_mouse_drag_event__ ¶
__window_mouse_drag_event__(
x: int, y: int, dx: int, dy: int
) -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
|
__ui__ ¶
__ui__() -> None
Source code in Projects/ShaderFlow/ShaderFlow/Scene.py
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
|