update all icons

This commit is contained in:
Milan Kolar 2021-04-02 16:13:25 +02:00
parent 4d984d2a8c
commit 1eef3339bb
24 changed files with 309 additions and 610 deletions

View file

@ -2,7 +2,7 @@
Taken from https://github.com/tokejepsen/ftrack-hooks/tree/master/batch_tasks
"""
from openpype.modules.ftrack.lib import BaseAction
from openpype.modules.ftrack.lib import BaseAction, statics_icon
class BatchTasksAction(BaseAction):
@ -13,10 +13,11 @@ class BatchTasksAction(BaseAction):
`identifier` a unique identifier for your action.
`description` a verbose descriptive text for you action
'''
label = "Batch Tasks"
label = "Batch Task Create"
variant = None
identifier = "batch-tasks"
description = None
icon = statics_icon("ftrack", "action_icons", "BatchTasks.svg")
def discover(self, session, entities, event):
'''Return true if we can handle the selected entities.
@ -29,11 +30,13 @@ class BatchTasksAction(BaseAction):
or Asset Build.
*event* the unmodified original event
'''
# Only discover the action if any selection is made.
if entities:
return True
return False
not_allowed = ["assetversion", "project", "ReviewSession"
if entities[0].entity_type.lower() in not_allowed:
return False
return True
def get_task_form_items(self, session, number_of_tasks):
items = []

View file

@ -1,4 +1,4 @@
from openpype.modules.ftrack.lib import BaseAction
from openpype.modules.ftrack.lib import BaseAction, statics_icon
try:
from functools import cmp_to_key
except Exception:
@ -50,6 +50,8 @@ class ClientReviewSort(BaseAction):
#: Action label.
label = 'Sort Review'
icon = statics_icon("ftrack", "action_icons", "SortReview.svg")
def discover(self, session, entities, event):
''' Validation '''