This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Feature/643 mark publishable instances in photoshop #1095
Merged
mkolar
merged 9 commits into
develop
from
3.0/feature/643-mark-publishable-instances-in-photoshop
Mar 10, 2021
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
80d7bb8
PS - added Subset Manager into menu
kalisp e19b960
PS - use subset name as instance name
kalisp 514dbfc
PS - added validator for unique subsets
kalisp e414ac8
PS - fixed validate_naming repair
kalisp ec06cc9
PS - added highlight with icon for publishable instances
kalisp 065266c
PS - added highlight with icon for publishable instances
kalisp 628b34a
PS - fixed validate_naming
kalisp 2f8ecc6
PS - fix repair validator - limit duplication of family
kalisp acb18c4
PS - fix create multiple groups instances
kalisp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
pype/hosts/photoshop/plugins/publish/validate_unique_subsets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pyblish.api | ||
import pype.api | ||
|
||
|
||
class ValidateSubsetUniqueness(pyblish.api.ContextPlugin): | ||
""" | ||
Validate that all subset's names are unique. | ||
""" | ||
|
||
label = "Validate Subset Uniqueness" | ||
hosts = ["photoshop"] | ||
order = pype.api.ValidateContentsOrder | ||
families = ["image"] | ||
|
||
def process(self, context): | ||
subset_names = [] | ||
|
||
for instance in context: | ||
if instance.data.get('publish'): | ||
subset_names.append(instance.data.get('subset')) | ||
|
||
msg = ( | ||
"Instance subset names are not unique. " + | ||
"Remove duplicates via SubsetManager." | ||
) | ||
assert len(subset_names) == len(set(subset_names)), msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuation line over-indented for hanging indent