ops
Blender operators and menus for use with Avalon.
LaunchCreator
Bases: LaunchQtApp
Launch Avalon Creator.
Source code in client/ayon_blender/api/ops.py
308 309 310 311 312 313 314 315 316 317 318 319 320 |
|
LaunchLibrary
Bases: LaunchQtApp
Launch Library Loader.
Source code in client/ayon_blender/api/ops.py
350 351 352 353 354 355 |
|
LaunchLoader
Bases: LaunchQtApp
Launch AYON Loader.
Source code in client/ayon_blender/api/ops.py
323 324 325 326 327 328 |
|
LaunchManager
Bases: LaunchQtApp
Launch Avalon Manager.
Source code in client/ayon_blender/api/ops.py
342 343 344 345 346 347 |
|
LaunchPublisher
Bases: LaunchQtApp
Launch Avalon Publisher.
Source code in client/ayon_blender/api/ops.py
331 332 333 334 335 336 337 338 339 |
|
LaunchQtApp
Bases: Operator
A Base class for operators to launch a Qt app.
Source code in client/ayon_blender/api/ops.py
210 211 212 213 214 215 216 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 |
|
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
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 |
|
LaunchWorkFiles
Bases: LaunchQtApp
Launch Avalon Work Files.
Source code in client/ayon_blender/api/ops.py
358 359 360 361 362 363 364 365 366 |
|
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
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 |
|
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
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 |
|
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
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
TOPBAR_MT_avalon
Bases: Menu
Avalon menu.
Source code in client/ayon_blender/api/ops.py
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 |
|
draw(context)
Draw the menu in the UI.
Source code in client/ayon_blender/api/ops.py
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 |
|
VersionUpWorkfile
Bases: LaunchQtApp
Perform Incremental Save Workfile.
Source code in client/ayon_blender/api/ops.py
402 403 404 405 406 407 408 409 410 |
|
draw_avalon_menu(self, context)
Draw the Avalon menu in the top bar.
Source code in client/ayon_blender/api/ops.py
474 475 476 477 |
|
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
42 43 44 45 46 47 |
|
register()
Register the operators and menu.
Source code in client/ayon_blender/api/ops.py
495 496 497 498 499 500 501 502 503 504 505 506 |
|
unregister()
Unregister the operators and menu.
Source code in client/ayon_blender/api/ops.py
509 510 511 512 513 514 515 516 |
|