Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking on the folder entity if it is there. #14

Merged
merged 11 commits into from
Jul 15, 2024
33 changes: 17 additions & 16 deletions client/ayon_unreal/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,27 +607,28 @@ def generate_sequence(h, h_dir):
folder_path,
fields={"id", "attrib.fps"}
)
if folder_entity:
unreal.log("Found folder entity data: {}".format(folder_entity))
start_frames = []
end_frames = []
moonyuet marked this conversation as resolved.
Show resolved Hide resolved

start_frames = []
end_frames = []

elements = list(ayon_api.get_folders(
project_name,
parent_ids=[folder_entity["id"]],
fields={"id", "attrib.clipIn", "attrib.clipOut"}
))
for e in elements:
start_frames.append(e["attrib"].get("clipIn"))
end_frames.append(e["attrib"].get("clipOut"))

elements.extend(ayon_api.get_folders(
elements = list(ayon_api.get_folders(
project_name,
parent_ids=[e["id"]],
parent_ids=[folder_entity.get("id", "")],
moonyuet marked this conversation as resolved.
Show resolved Hide resolved
fields={"id", "attrib.clipIn", "attrib.clipOut"}
))
for e in elements:
start_frames.append(e["attrib"].get("clipIn"))
end_frames.append(e["attrib"].get("clipOut"))

elements.extend(ayon_api.get_folders(
project_name,
parent_ids=[e["id"]],
fields={"id", "attrib.clipIn", "attrib.clipOut"}
))

min_frame = min(start_frames)
max_frame = max(end_frames)
min_frame = min(start_frames) or sequence.get_playback_start()
max_frame = max(end_frames) or sequence.get_playback_end()
moonyuet marked this conversation as resolved.
Show resolved Hide resolved

fps = folder_entity["attrib"].get("fps")

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_unreal/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring unreal addon version."""
__version__ = "0.2.0"
__version__ = "0.2.2"
2 changes: 1 addition & 1 deletion package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "unreal"
title = "Unreal"
version = "0.2.1-dev.1"
version = "0.2.2-dev.1"
moonyuet marked this conversation as resolved.
Show resolved Hide resolved

client_dir = "ayon_unreal"

Expand Down