ops
Blender operators and menus for use with AYON.
BuildWorkfileFromTemplate
Bases: LaunchQtApp
Build Workfile from ayon template settings.
Source code in client/ayon_blender/api/ops.py
443 444 445 446 447 448 449 450 451 | |
CreateFirstWorkfileFromTemplate
Bases: LaunchQtApp
Build Workfile from ayon template settings.
Source code in client/ayon_blender/api/ops.py
432 433 434 435 436 437 438 439 440 | |
CreatePlaceholder
Bases: LaunchQtApp
Create Placeholder from ayon template settings.
Source code in client/ayon_blender/api/ops.py
480 481 482 483 484 485 486 487 488 489 490 | |
LaunchCreator
Bases: LaunchQtApp
Launch AYON Creator.
Source code in client/ayon_blender/api/ops.py
315 316 317 318 319 320 321 322 323 324 325 326 327 | |
LaunchLibrary
Bases: LaunchQtApp
Launch Library Loader.
Source code in client/ayon_blender/api/ops.py
357 358 359 360 361 362 | |
LaunchLoader
Bases: LaunchQtApp
Launch AYON Loader.
Source code in client/ayon_blender/api/ops.py
330 331 332 333 334 335 | |
LaunchManager
Bases: LaunchQtApp
Launch AYON Manager.
Source code in client/ayon_blender/api/ops.py
349 350 351 352 353 354 | |
LaunchPublisher
Bases: LaunchQtApp
Launch AYON Publisher.
Source code in client/ayon_blender/api/ops.py
338 339 340 341 342 343 344 345 346 | |
LaunchQtApp
Bases: Operator
A Base class for operators to launch a Qt app.
Source code in client/ayon_blender/api/ops.py
217 218 219 220 221 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 | |
execute(context)
Execute the operator.
The child class must implement execute() where it only has to set self._window to the desired Qt window and then simply run return super().execute(context). self._window is expected to have a show method. If the show method requires arguments, you can set self._show_args and self._show_kwargs. args should be a list, kwargs a dictionary.
Source code in client/ayon_blender/api/ops.py
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 | |
LaunchWorkFiles
Bases: LaunchQtApp
Launch AYON Work Files.
Source code in client/ayon_blender/api/ops.py
365 366 367 368 369 370 371 372 373 | |
MainThreadItem
Structure to store information about callback in main thread.
Item should be used to execute callback in main thread which may be needed for execution of Qt objects.
Item store callback (callable variable), arguments and keyword arguments for the callback. Item hold information about it's process.
Source code in client/ayon_blender/api/ops.py
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 | |
execute()
Execute callback and store its result.
Method must be called from main thread. Item is marked as done when callback execution finished. Store output of callback of exception information when callback raises one.
Source code in client/ayon_blender/api/ops.py
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 | |
wait()
Wait for result from main thread.
This method stops current thread until callback is executed.
Returns:
| Name | Type | Description |
|---|---|---|
object | Output of callback. May be any type or object. |
Raises:
| Type | Description |
|---|---|
Exception | Reraise any exception that happened during callback execution. |
Source code in client/ayon_blender/api/ops.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
OpenTemplate
Bases: LaunchQtApp
Build Workfile from ayon template settings.
Source code in client/ayon_blender/api/ops.py
466 467 468 469 470 471 472 473 474 475 476 | |
TOPBAR_MT_ayon
Bases: Menu
AYON menu.
Source code in client/ayon_blender/api/ops.py
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 | |
draw(context)
Draw the menu in the UI.
Source code in client/ayon_blender/api/ops.py
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 | |
TOPBAR_MT_ayon_Templated_Workfile
Bases: Menu
AYON submenu example.
Source code in client/ayon_blender/api/ops.py
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 | |
UpdatePlaceholder
Bases: LaunchQtApp
Update Placeholder from ayon template settings.
Source code in client/ayon_blender/api/ops.py
493 494 495 496 497 498 499 500 501 502 503 | |
VersionUpWorkfile
Bases: LaunchQtApp
Perform Incremental Save Workfile.
Source code in client/ayon_blender/api/ops.py
421 422 423 424 425 426 427 428 429 | |
draw_ayon_menu(self, context)
Draw the AYON menu in the top bar.
Source code in client/ayon_blender/api/ops.py
611 612 613 614 | |
execute_function_in_main_thread(f)
Decorator to move a function call into main thread items
Source code in client/ayon_blender/api/ops.py
40 41 42 43 44 45 | |
register()
Register the operators and menu.
Source code in client/ayon_blender/api/ops.py
640 641 642 643 644 645 646 647 648 649 650 651 | |
unregister()
Unregister the operators and menu.
Source code in client/ayon_blender/api/ops.py
654 655 656 657 658 659 660 661 | |