-
Notifications
You must be signed in to change notification settings - Fork 129
Photoshop: implemented {layer} placeholder in subset template #3591
Changes from 4 commits
4379dc0
8c95aab
87cf386
a03f2b6
de8668d
8318842
90962d6
3b9e485
4ac9ed6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ | |
CreatedInstance, | ||
legacy_io | ||
) | ||
from openpype.hosts.photoshop.api.plugin import ( | ||
get_subset_template, | ||
get_subset_name_for_multiple | ||
) | ||
|
||
|
||
class ImageCreator(Creator): | ||
|
@@ -68,7 +72,12 @@ def create(self, subset_name_from_ui, data, pre_create_data): | |
|
||
if creating_multiple_groups: | ||
# concatenate with layer name to differentiate subsets | ||
subset_name += group.name.title().replace(" ", "") | ||
subset_template = get_subset_template(self.family) | ||
subset_name = get_subset_name_for_multiple(subset_name, | ||
subset_template, | ||
group, | ||
self.family, | ||
data["variant"]) | ||
|
||
if group.long_name: | ||
for directory in group.long_name[::-1]: | ||
|
@@ -143,3 +152,9 @@ def _handle_legacy(self, instance_data): | |
def _clean_highlights(self, stub, item): | ||
return item.replace(stub.PUBLISH_ICON, '').replace(stub.LOADED_ICON, | ||
'') | ||
@classmethod | ||
def get_dynamic_data( | ||
cls, variant, task_name, asset_id, project_name, host_name | ||
): | ||
"""Called by UI, empty value for layer must be provided.""" | ||
return {"layer": ""} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe simpler variant would be to return formattings placeholder and fill it in create?
And in create:
You don't need to duplicate code with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This wouldn't work if layer name is not used in subset name (which might not be all the time). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would just not fill it. In that case the subset name would stay unchanged which is not an issue.
|
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.
expected 1 blank line, found 0