mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added statics_icon function for easier getting icon path for actions
This commit is contained in:
parent
f32fc2dfe2
commit
7a1b4ef358
2 changed files with 10 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ from . import avalon_sync
|
||||||
from . import credentials
|
from . import credentials
|
||||||
from .ftrack_base_handler import BaseHandler
|
from .ftrack_base_handler import BaseHandler
|
||||||
from .ftrack_event_handler import BaseEvent
|
from .ftrack_event_handler import BaseEvent
|
||||||
from .ftrack_action_handler import BaseAction
|
from .ftrack_action_handler import BaseAction, statics_icon
|
||||||
from .ftrack_app_handler import AppAction
|
from .ftrack_app_handler import AppAction
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|
@ -11,5 +11,6 @@ __all__ = [
|
||||||
"BaseHandler",
|
"BaseHandler",
|
||||||
"BaseEvent",
|
"BaseEvent",
|
||||||
"BaseAction",
|
"BaseAction",
|
||||||
|
"statics_icon",
|
||||||
"AppAction"
|
"AppAction"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
|
import os
|
||||||
from .ftrack_base_handler import BaseHandler
|
from .ftrack_base_handler import BaseHandler
|
||||||
|
|
||||||
|
|
||||||
|
def statics_icon(*icon_statics_file_parts):
|
||||||
|
statics_server = os.environ.get("PYPE_STATICS_SERVER")
|
||||||
|
if not statics_server:
|
||||||
|
return None
|
||||||
|
return "/".join((statics_server, *icon_statics_file_parts))
|
||||||
|
|
||||||
|
|
||||||
class BaseAction(BaseHandler):
|
class BaseAction(BaseHandler):
|
||||||
'''Custom Action base class
|
'''Custom Action base class
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue