diff --git a/pype/modules/ftrack/lib/__init__.py b/pype/modules/ftrack/lib/__init__.py index e58804440a..df546ab725 100644 --- a/pype/modules/ftrack/lib/__init__.py +++ b/pype/modules/ftrack/lib/__init__.py @@ -2,7 +2,7 @@ from . import avalon_sync from . import credentials from .ftrack_base_handler import BaseHandler 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 __all__ = [ @@ -11,5 +11,6 @@ __all__ = [ "BaseHandler", "BaseEvent", "BaseAction", + "statics_icon", "AppAction" ] diff --git a/pype/modules/ftrack/lib/ftrack_action_handler.py b/pype/modules/ftrack/lib/ftrack_action_handler.py index 66d321316f..6629a8316b 100644 --- a/pype/modules/ftrack/lib/ftrack_action_handler.py +++ b/pype/modules/ftrack/lib/ftrack_action_handler.py @@ -1,6 +1,14 @@ +import os 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): '''Custom Action base class