mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
OP-2895 - updates for flatten image
New ephemeral instance doesn't have any layer, previous implementation depended on it.
This commit is contained in:
parent
2e35be0150
commit
ee0bb56459
2 changed files with 6 additions and 1 deletions
|
|
@ -26,8 +26,10 @@ class ExtractImage(openpype.api.Extractor):
|
|||
with photoshop.maintained_selection():
|
||||
self.log.info("Extracting %s" % str(list(instance)))
|
||||
with photoshop.maintained_visibility():
|
||||
ids = set()
|
||||
layer = instance.data.get("layer")
|
||||
ids = set([layer.id])
|
||||
if layer:
|
||||
ids.add(layer.id)
|
||||
add_ids = instance.data.pop("ids", None)
|
||||
if add_ids:
|
||||
ids.update(set(add_ids))
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ class ExtractReview(openpype.api.Extractor):
|
|||
for image_instance in instance.context:
|
||||
if image_instance.data["family"] != "image":
|
||||
continue
|
||||
if not image_instance.data.get("layer"):
|
||||
# dummy instance for flatten image
|
||||
continue
|
||||
layers.append(image_instance.data.get("layer"))
|
||||
|
||||
return sorted(layers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue