ops
Blender operators and menus for use with AYON.
LaunchCreator
Bases: LaunchQtApp
Launch AYON Creator.
Source code in client/ayon_blender/api/ops.py
319 320 321 322 323 324 325 326 327 328 329 330 331 | |
LaunchLibrary
Bases: LaunchQtApp
Launch Library Loader.
Source code in client/ayon_blender/api/ops.py
361 362 363 364 365 366 | |
LaunchLoader
Bases: LaunchQtApp
Launch AYON Loader.
Source code in client/ayon_blender/api/ops.py
334 335 336 337 338 339 | |
LaunchManager
Bases: LaunchQtApp
Launch AYON Manager.
Source code in client/ayon_blender/api/ops.py
353 354 355 356 357 358 | |
LaunchPublisher
Bases: LaunchQtApp
Launch AYON Publisher.
Source code in client/ayon_blender/api/ops.py
342 343 344 345 346 347 348 349 350 | |
LaunchQtApp
Bases: Operator
A Base class for operators to launch a Qt app.
Source code in client/ayon_blender/api/ops.py
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 313 314 315 316 | |
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
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 | |
LaunchWorkFiles
Bases: LaunchQtApp
Launch AYON Work Files.
Source code in client/ayon_blender/api/ops.py
369 370 371 372 373 374 375 376 377 | |
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
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 | |
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
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 | |
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
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
TOPBAR_MT_ayon
Bases: Menu
AYON menu.
Source code in client/ayon_blender/api/ops.py
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 | |
draw(context)
Draw the menu in the UI.
Source code in client/ayon_blender/api/ops.py
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 | |
VersionUpWorkfile
Bases: LaunchQtApp
Perform Incremental Save Workfile.
Source code in client/ayon_blender/api/ops.py
427 428 429 430 431 432 433 434 435 | |
draw_ayon_menu(self, context)
Draw the AYON menu in the top bar.
Source code in client/ayon_blender/api/ops.py
501 502 503 504 | |
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
44 45 46 47 48 49 | |
register()
Register the operators and menu.
Source code in client/ayon_blender/api/ops.py
523 524 525 526 527 528 529 530 531 532 533 534 | |
unregister()
Unregister the operators and menu.
Source code in client/ayon_blender/api/ops.py
537 538 539 540 541 542 543 544 | |