mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
modified click_wrap examples and readme
This commit is contained in:
parent
b7d86bee3f
commit
3484a3d79b
2 changed files with 7 additions and 7 deletions
|
|
@ -31,7 +31,7 @@ AYON addons should contain separated logic of specific kind of implementation, s
|
|||
- addon must implement `get_plugin_paths` which must return dictionary with possible keys `"publish"`, `"load"`, `"create"` or `"actions"`
|
||||
- each key may contain list or string with a path to directory with plugins
|
||||
|
||||
## ITrayModule
|
||||
## ITrayAddon
|
||||
- addon has more logic when used in a tray
|
||||
- it is possible that addon can be used only in the tray
|
||||
- abstract methods
|
||||
|
|
@ -46,7 +46,7 @@ AYON addons should contain separated logic of specific kind of implementation, s
|
|||
- if addon has logic only in tray or for both then should be checking for `tray_initialized` attribute to decide how should handle situations
|
||||
|
||||
### ITrayService
|
||||
- inherits from `ITrayModule` and implements `tray_menu` method for you
|
||||
- inherits from `ITrayAddon` and implements `tray_menu` method for you
|
||||
- adds action to submenu "Services" in tray widget menu with icon and label
|
||||
- abstract attribute `label`
|
||||
- label shown in menu
|
||||
|
|
@ -57,7 +57,7 @@ AYON addons should contain separated logic of specific kind of implementation, s
|
|||
- these states must be set by addon itself `set_service_running` is default state on initialization
|
||||
|
||||
### ITrayAction
|
||||
- inherits from `ITrayModule` and implements `tray_menu` method for you
|
||||
- inherits from `ITrayAddon` and implements `tray_menu` method for you
|
||||
- adds action to tray widget menu with label
|
||||
- abstract attribute `label`
|
||||
- label shown in menu
|
||||
|
|
@ -89,4 +89,4 @@ AYON addons should contain separated logic of specific kind of implementation, s
|
|||
|
||||
### TrayAddonsManager
|
||||
- inherits from `AddonsManager`
|
||||
- has specific implementation for Pype Tray tool and handle `ITrayModule` methods
|
||||
- has specific implementation for Pype Tray tool and handle `ITrayAddon` methods
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ method to convert 'click_wrap' object to 'click' object.
|
|||
Before
|
||||
```python
|
||||
import click
|
||||
from ayon_core.modules import AYONAddon
|
||||
from ayon_core.addon import AYONAddon
|
||||
|
||||
|
||||
class ExampleAddon(AYONAddon):
|
||||
|
|
@ -40,7 +40,7 @@ def mycommand(arg1, arg2):
|
|||
Now
|
||||
```
|
||||
from ayon_core import click_wrap
|
||||
from ayon_core.modules import AYONAddon
|
||||
from ayon_core.addon import AYONAddon
|
||||
|
||||
|
||||
class ExampleAddon(AYONAddon):
|
||||
|
|
@ -72,7 +72,7 @@ Added small enhancements:
|
|||
Example:
|
||||
```python
|
||||
from ayon_core import click_wrap
|
||||
from ayon_core.modules import AYONAddon
|
||||
from ayon_core.addon import AYONAddon
|
||||
|
||||
|
||||
class ExampleAddon(AYONAddon):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue