From 8c2f73114910f8e5c4ccd6853817594438ae8bde Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Aug 2019 17:45:25 +0200 Subject: [PATCH 1/5] few ftrack actions were grouped with label+variant and their icons were replaced with group icons --- .../actions/action_attributes_remapper.py | 5 +- .../actions/action_create_cust_attrs.py | 5 +- .../ftrack/actions/action_cust_attr_doctor.py | 5 +- pype/ftrack/actions/action_job_killer.py | 5 +- .../actions/action_sync_hier_attrs_local.py | 5 +- .../actions/action_sync_to_avalon_local.py | 5 +- pype/ftrack/actions/action_thumbToChildern.py | 6 +- pype/ftrack/actions/action_thumbToParent.py | 6 +- .../action_icons/AttributesRemapper.svg | 1 - res/ftrack/action_icons/CustomAttributes.svg | 41 -- res/ftrack/action_icons/JobKiller.svg | 374 ------------------ res/ftrack/action_icons/PypeAdmin.svg | 173 ++++++++ res/ftrack/action_icons/PypeDoctor.svg | 114 ++++++ .../SyncHierarchicalAttrsLocal.svg | 1 - .../action_icons/SyncToAvalon-local.svg | 1 - res/ftrack/action_icons/Thumbnail.svg | 136 +++++++ res/ftrack/action_icons/thumbToChildren.svg | 113 ------ res/ftrack/action_icons/thumbToParent.svg | 130 ------ 18 files changed, 449 insertions(+), 677 deletions(-) delete mode 100644 res/ftrack/action_icons/AttributesRemapper.svg delete mode 100644 res/ftrack/action_icons/CustomAttributes.svg delete mode 100644 res/ftrack/action_icons/JobKiller.svg create mode 100644 res/ftrack/action_icons/PypeAdmin.svg create mode 100644 res/ftrack/action_icons/PypeDoctor.svg delete mode 100644 res/ftrack/action_icons/SyncHierarchicalAttrsLocal.svg delete mode 100644 res/ftrack/action_icons/SyncToAvalon-local.svg create mode 100644 res/ftrack/action_icons/Thumbnail.svg delete mode 100644 res/ftrack/action_icons/thumbToChildren.svg delete mode 100644 res/ftrack/action_icons/thumbToParent.svg diff --git a/pype/ftrack/actions/action_attributes_remapper.py b/pype/ftrack/actions/action_attributes_remapper.py index a098225125..db33fd1365 100644 --- a/pype/ftrack/actions/action_attributes_remapper.py +++ b/pype/ftrack/actions/action_attributes_remapper.py @@ -11,13 +11,14 @@ class AttributesRemapper(BaseAction): #: Action identifier. identifier = 'attributes.remapper' #: Action label. - label = 'Attributes Remapper' + label = "Pype Doctor" + variant = '- Attributes Remapper' #: Action description. description = 'Remaps attributes in avalon DB' #: roles that are allowed to register this action role_list = ["Pypeclub", "Administrator"] - icon = '{}/ftrack/action_icons/AttributesRemapper.svg'.format( + icon = '{}/ftrack/action_icons/PypeDoctor.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/pype/ftrack/actions/action_create_cust_attrs.py b/pype/ftrack/actions/action_create_cust_attrs.py index 6a68eb783e..47a6bb5d5f 100644 --- a/pype/ftrack/actions/action_create_cust_attrs.py +++ b/pype/ftrack/actions/action_create_cust_attrs.py @@ -110,12 +110,13 @@ class CustomAttributes(BaseAction): #: Action identifier. identifier = 'create.update.attributes' #: Action label. - label = 'Create/Update Avalon Attributes' + label = "Pype Admin" + variant = '- Create/Update Avalon Attributes' #: Action description. description = 'Creates Avalon/Mongo ID for double check' #: roles that are allowed to register this action role_list = ['Pypeclub', 'Administrator'] - icon = '{}/ftrack/action_icons/CustomAttributes.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/pype/ftrack/actions/action_cust_attr_doctor.py b/pype/ftrack/actions/action_cust_attr_doctor.py index a6ccb237a6..1b8f250e5b 100644 --- a/pype/ftrack/actions/action_cust_attr_doctor.py +++ b/pype/ftrack/actions/action_cust_attr_doctor.py @@ -12,14 +12,15 @@ class CustomAttributeDoctor(BaseAction): #: Action identifier. identifier = 'custom.attributes.doctor' #: Action label. - label = 'Custom Attributes Doctor' + label = "Pype Doctor" + variant = '- Custom Attributes Doctor' #: Action description. description = ( 'Fix hierarchical custom attributes mainly handles, fstart' ' and fend' ) - icon = '{}/ftrack/action_icons/TestAction.svg'.format( + icon = '{}/ftrack/action_icons/PypeDoctor.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) hierarchical_ca = ['handle_start', 'handle_end', 'fstart', 'fend'] diff --git a/pype/ftrack/actions/action_job_killer.py b/pype/ftrack/actions/action_job_killer.py index 8ac81c4ac2..8584b26aa4 100644 --- a/pype/ftrack/actions/action_job_killer.py +++ b/pype/ftrack/actions/action_job_killer.py @@ -14,12 +14,13 @@ class JobKiller(BaseAction): #: Action identifier. identifier = 'job.killer' #: Action label. - label = 'Job Killer' + label = "Pype Admin" + variant = '- Job Killer' #: Action description. description = 'Killing selected running jobs' #: roles that are allowed to register this action role_list = ['Pypeclub', 'Administrator'] - icon = '{}/ftrack/action_icons/JobKiller.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/pype/ftrack/actions/action_sync_hier_attrs_local.py b/pype/ftrack/actions/action_sync_hier_attrs_local.py index 31d95f9a6f..01434470f3 100644 --- a/pype/ftrack/actions/action_sync_hier_attrs_local.py +++ b/pype/ftrack/actions/action_sync_hier_attrs_local.py @@ -19,11 +19,12 @@ class SyncHierarchicalAttrs(BaseAction): #: Action identifier. identifier = 'sync.hierarchical.attrs.local' #: Action label. - label = 'Sync HierAttrs - Local' + label = "Pype Admin" + variant = '- Sync Hier Attrs (Local)' #: Action description. description = 'Synchronize hierarchical attributes' #: Icon - icon = '{}/ftrack/action_icons/SyncHierarchicalAttrsLocal.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/pype/ftrack/actions/action_sync_to_avalon_local.py b/pype/ftrack/actions/action_sync_to_avalon_local.py index 6e603b33b3..39e4931672 100644 --- a/pype/ftrack/actions/action_sync_to_avalon_local.py +++ b/pype/ftrack/actions/action_sync_to_avalon_local.py @@ -47,11 +47,12 @@ class SyncToAvalon(BaseAction): #: Action identifier. identifier = 'sync.to.avalon.local' #: Action label. - label = 'SyncToAvalon - Local' + label = "Pype Admin" + variant = '- Sync To Avalon (Local)' #: Action description. description = 'Send data from Ftrack to Avalon' #: Action icon. - icon = '{}/ftrack/action_icons/SyncToAvalon-local.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) #: roles that are allowed to register this action diff --git a/pype/ftrack/actions/action_thumbToChildern.py b/pype/ftrack/actions/action_thumbToChildern.py index 99ca713662..101b678512 100644 --- a/pype/ftrack/actions/action_thumbToChildern.py +++ b/pype/ftrack/actions/action_thumbToChildern.py @@ -14,9 +14,11 @@ class ThumbToChildren(BaseAction): # Action identifier identifier = 'thumb.to.children' # Action label - label = 'Thumbnail to Children' + label = 'Thumbnail' + # Action variant + variant = " to Children" # Action icon - icon = '{}/ftrack/action_icons/thumbToChildren.svg'.format( + icon = '{}/ftrack/action_icons/Thumbnail.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/pype/ftrack/actions/action_thumbToParent.py b/pype/ftrack/actions/action_thumbToParent.py index 9de9cd8cc4..c382d9303c 100644 --- a/pype/ftrack/actions/action_thumbToParent.py +++ b/pype/ftrack/actions/action_thumbToParent.py @@ -13,9 +13,11 @@ class ThumbToParent(BaseAction): # Action identifier identifier = 'thumb.to.parent' # Action label - label = 'Thumbnail to Parent' + label = 'Thumbnail' + # Action variant + variant = " to Parent" # Action icon - icon = '{}/ftrack/action_icons/thumbToParent.svg'.format( + icon = '{}/ftrack/action_icons/Thumbnail.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) diff --git a/res/ftrack/action_icons/AttributesRemapper.svg b/res/ftrack/action_icons/AttributesRemapper.svg deleted file mode 100644 index 94bf8c4f14..0000000000 --- a/res/ftrack/action_icons/AttributesRemapper.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/res/ftrack/action_icons/CustomAttributes.svg b/res/ftrack/action_icons/CustomAttributes.svg deleted file mode 100644 index ee1af3378e..0000000000 --- a/res/ftrack/action_icons/CustomAttributes.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/ftrack/action_icons/JobKiller.svg b/res/ftrack/action_icons/JobKiller.svg deleted file mode 100644 index 595c780a9b..0000000000 --- a/res/ftrack/action_icons/JobKiller.svg +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/ftrack/action_icons/PypeAdmin.svg b/res/ftrack/action_icons/PypeAdmin.svg new file mode 100644 index 0000000000..c95a29dacb --- /dev/null +++ b/res/ftrack/action_icons/PypeAdmin.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + diff --git a/res/ftrack/action_icons/PypeDoctor.svg b/res/ftrack/action_icons/PypeDoctor.svg new file mode 100644 index 0000000000..e921d99ee5 --- /dev/null +++ b/res/ftrack/action_icons/PypeDoctor.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + diff --git a/res/ftrack/action_icons/SyncHierarchicalAttrsLocal.svg b/res/ftrack/action_icons/SyncHierarchicalAttrsLocal.svg deleted file mode 100644 index f58448ac06..0000000000 --- a/res/ftrack/action_icons/SyncHierarchicalAttrsLocal.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/res/ftrack/action_icons/SyncToAvalon-local.svg b/res/ftrack/action_icons/SyncToAvalon-local.svg deleted file mode 100644 index bf4708e8a5..0000000000 --- a/res/ftrack/action_icons/SyncToAvalon-local.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/res/ftrack/action_icons/Thumbnail.svg b/res/ftrack/action_icons/Thumbnail.svg new file mode 100644 index 0000000000..a8780b9a04 --- /dev/null +++ b/res/ftrack/action_icons/Thumbnail.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/ftrack/action_icons/thumbToChildren.svg b/res/ftrack/action_icons/thumbToChildren.svg deleted file mode 100644 index 709b9549f3..0000000000 --- a/res/ftrack/action_icons/thumbToChildren.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/res/ftrack/action_icons/thumbToParent.svg b/res/ftrack/action_icons/thumbToParent.svg deleted file mode 100644 index 3efa426332..0000000000 --- a/res/ftrack/action_icons/thumbToParent.svg +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - From 4d221e91e25dce1ef964d846356cd325fbe8f69e Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Aug 2019 17:48:41 +0200 Subject: [PATCH 2/5] action create project folders renamed to create project structure and allowed only on project --- ...ect_folders.py => action_create_project_structure.py} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename pype/ftrack/actions/{action_create_project_folders.py => action_create_project_structure.py} (97%) diff --git a/pype/ftrack/actions/action_create_project_folders.py b/pype/ftrack/actions/action_create_project_structure.py similarity index 97% rename from pype/ftrack/actions/action_create_project_folders.py rename to pype/ftrack/actions/action_create_project_structure.py index ef48df7d67..74d458b5f8 100644 --- a/pype/ftrack/actions/action_create_project_folders.py +++ b/pype/ftrack/actions/action_create_project_structure.py @@ -13,9 +13,9 @@ class CreateProjectFolders(BaseAction): '''Edit meta data action.''' #: Action identifier. - identifier = 'create.project.folders' + identifier = 'create.project.structure' #: Action label. - label = 'Create Project Folders' + label = 'Create Project Structure' #: Action description. description = 'Creates folder structure' #: roles that are allowed to register this action @@ -31,6 +31,11 @@ class CreateProjectFolders(BaseAction): def discover(self, session, entities, event): ''' Validation ''' + if len(entities) != 1: + return False + + if entities[0].entity_type.lower() != "project": + return False return True From f6077e7e95d675b2f5e0e1aa412ce402fcc8e331 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Aug 2019 17:49:08 +0200 Subject: [PATCH 3/5] action create folders won't discover on project now --- pype/ftrack/actions/action_create_folders.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pype/ftrack/actions/action_create_folders.py b/pype/ftrack/actions/action_create_folders.py index dc969ada02..b9e10f7c30 100644 --- a/pype/ftrack/actions/action_create_folders.py +++ b/pype/ftrack/actions/action_create_folders.py @@ -30,11 +30,13 @@ class CreateFolders(BaseAction): def discover(self, session, entities, event): ''' Validation ''' - not_allowed = ['assetversion'] if len(entities) != 1: return False + + not_allowed = ['assetversion', 'project'] if entities[0].entity_type.lower() in not_allowed: return False + return True def interface(self, session, entities, event): From d13f67ea9e60016eedca45745b32421957ca2049 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Aug 2019 17:50:33 +0200 Subject: [PATCH 4/5] both thumbnail action files were renamed to match underscore naming --- ...{action_thumbToChildern.py => action_thumbnail_to_childern.py} | 0 .../{action_thumbToParent.py => action_thumbnail_to_parent.py} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pype/ftrack/actions/{action_thumbToChildern.py => action_thumbnail_to_childern.py} (100%) rename pype/ftrack/actions/{action_thumbToParent.py => action_thumbnail_to_parent.py} (100%) diff --git a/pype/ftrack/actions/action_thumbToChildern.py b/pype/ftrack/actions/action_thumbnail_to_childern.py similarity index 100% rename from pype/ftrack/actions/action_thumbToChildern.py rename to pype/ftrack/actions/action_thumbnail_to_childern.py diff --git a/pype/ftrack/actions/action_thumbToParent.py b/pype/ftrack/actions/action_thumbnail_to_parent.py similarity index 100% rename from pype/ftrack/actions/action_thumbToParent.py rename to pype/ftrack/actions/action_thumbnail_to_parent.py From 998b424129210d6fd79d317391c0056270aeeb01 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 13 Aug 2019 14:09:16 +0200 Subject: [PATCH 5/5] added DeleteAssetByName and server synchronization actions to Pype Admin group --- pype/ftrack/actions/action_delete_asset_byname.py | 5 +++-- pype/ftrack/events/action_sync_hier_attrs.py | 5 +++-- pype/ftrack/events/action_sync_to_avalon.py | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pype/ftrack/actions/action_delete_asset_byname.py b/pype/ftrack/actions/action_delete_asset_byname.py index 1c05d7d88c..4f2a0e515c 100644 --- a/pype/ftrack/actions/action_delete_asset_byname.py +++ b/pype/ftrack/actions/action_delete_asset_byname.py @@ -13,12 +13,13 @@ class AssetsRemover(BaseAction): #: Action identifier. identifier = 'remove.assets' #: Action label. - label = 'Delete Assets by Name' + label = "Pype Admin" + variant = '- Delete Assets by Name' #: Action description. description = 'Removes assets from Ftrack and Avalon db with all childs' #: roles that are allowed to register this action role_list = ['Pypeclub', 'Administrator'] - icon = '{}/ftrack/action_icons/AssetsRemover.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get('PYPE_STATICS_SERVER', '') ) #: Db diff --git a/pype/ftrack/events/action_sync_hier_attrs.py b/pype/ftrack/events/action_sync_hier_attrs.py index cd7446f5e4..22ad7bf5aa 100644 --- a/pype/ftrack/events/action_sync_hier_attrs.py +++ b/pype/ftrack/events/action_sync_hier_attrs.py @@ -20,11 +20,12 @@ class SyncHierarchicalAttrs(BaseAction): #: Action identifier. identifier = 'sync.hierarchical.attrs' #: Action label. - label = 'Sync HierAttrs' + label = "Pype Admin" + variant = '- Sync Hier Attrs (server)' #: Action description. description = 'Synchronize hierarchical attributes' #: Icon - icon = '{}/ftrack/action_icons/SyncHierarchicalAttrs.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get( 'PYPE_STATICS_SERVER', 'http://localhost:{}'.format( diff --git a/pype/ftrack/events/action_sync_to_avalon.py b/pype/ftrack/events/action_sync_to_avalon.py index fc03180bdc..5628554c85 100644 --- a/pype/ftrack/events/action_sync_to_avalon.py +++ b/pype/ftrack/events/action_sync_to_avalon.py @@ -48,11 +48,12 @@ class Sync_To_Avalon(BaseAction): #: Action identifier. identifier = 'sync.to.avalon' #: Action label. - label = 'SyncToAvalon' + label = "Pype Admin" + variant = "- Sync To Avalon (Server)" #: Action description. description = 'Send data from Ftrack to Avalon' #: Action icon. - icon = '{}/ftrack/action_icons/SyncToAvalon.svg'.format( + icon = '{}/ftrack/action_icons/PypeAdmin.svg'.format( os.environ.get( 'PYPE_STATICS_SERVER', 'http://localhost:{}'.format(