mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #3610 from pypeclub/bugfix/OP-3684_Refactored-integrate-doesnt-work-for-AE-multi-frame-publishes
AfterEffects: refactored integrate doesnt work formulti frame publishes
This commit is contained in:
commit
23c927cde2
4 changed files with 83 additions and 24 deletions
|
|
@ -102,7 +102,6 @@ class CollectAERender(publish.AbstractCollectRender):
|
|||
attachTo=False,
|
||||
setMembers='',
|
||||
publish=True,
|
||||
renderer='aerender',
|
||||
name=subset_name,
|
||||
resolutionWidth=render_q.width,
|
||||
resolutionHeight=render_q.height,
|
||||
|
|
@ -113,7 +112,6 @@ class CollectAERender(publish.AbstractCollectRender):
|
|||
frameStart=frame_start,
|
||||
frameEnd=frame_end,
|
||||
frameStep=1,
|
||||
toBeRenderedOn='deadline',
|
||||
fps=fps,
|
||||
app_version=app_version,
|
||||
publish_attributes=inst.data.get("publish_attributes", {}),
|
||||
|
|
@ -138,6 +136,9 @@ class CollectAERender(publish.AbstractCollectRender):
|
|||
fam = "render.farm"
|
||||
if fam not in instance.families:
|
||||
instance.families.append(fam)
|
||||
instance.toBeRenderedOn = "deadline"
|
||||
instance.renderer = "aerender"
|
||||
instance.farm = True # to skip integrate
|
||||
|
||||
instances.append(instance)
|
||||
instances_to_remove.append(inst)
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ class RenderInstance(object):
|
|||
|
||||
family = attr.ib(default="renderlayer")
|
||||
families = attr.ib(default=["renderlayer"]) # list of families
|
||||
# True if should be rendered on farm, eg not integrate
|
||||
farm = attr.ib(default=False)
|
||||
|
||||
# format settings
|
||||
multipartExr = attr.ib(default=False) # flag for multipart exrs
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
import logging
|
||||
|
||||
from tests.lib.assert_classes import DBAssert
|
||||
from tests.integration.hosts.aftereffects.lib import AfterEffectsTestClass
|
||||
|
||||
log = logging.getLogger("test_publish_in_aftereffects")
|
||||
|
||||
|
||||
class TestPublishInAfterEffects(AfterEffectsTestClass):
|
||||
"""Basic test case for publishing in AfterEffects
|
||||
|
||||
Should publish 5 frames
|
||||
"""
|
||||
PERSIST = True
|
||||
|
||||
TEST_FILES = [
|
||||
("12aSDRjthn4X3yw83gz_0FZJcRRiVDEYT",
|
||||
"test_aftereffects_publish_multiframe.zip",
|
||||
"")
|
||||
]
|
||||
|
||||
APP = "aftereffects"
|
||||
APP_VARIANT = ""
|
||||
|
||||
APP_NAME = "{}/{}".format(APP, APP_VARIANT)
|
||||
|
||||
TIMEOUT = 120 # publish timeout
|
||||
|
||||
def test_db_asserts(self, dbcon, publish_finished):
|
||||
"""Host and input data dependent expected results in DB."""
|
||||
print("test_db_asserts")
|
||||
failures = []
|
||||
|
||||
failures.append(DBAssert.count_of_types(dbcon, "version", 2))
|
||||
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "version", 0, name={"$ne": 1}))
|
||||
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "subset", 1,
|
||||
name="imageMainBackgroundcopy"))
|
||||
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "subset", 1,
|
||||
name="workfileTest_task"))
|
||||
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "subset", 1,
|
||||
name="reviewTesttask"))
|
||||
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 4))
|
||||
|
||||
additional_args = {"context.subset": "renderTestTaskDefault",
|
||||
"context.ext": "png"}
|
||||
failures.append(
|
||||
DBAssert.count_of_types(dbcon, "representation", 1,
|
||||
additional_args=additional_args))
|
||||
|
||||
assert not any(failures)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_case = TestPublishInAfterEffects()
|
||||
|
|
@ -314,30 +314,22 @@ class PublishTest(ModuleUnitTest):
|
|||
|
||||
Compares only presence, not size nor content!
|
||||
"""
|
||||
published_dir_base = download_test_data
|
||||
published_dir = os.path.join(output_folder_url,
|
||||
self.PROJECT,
|
||||
self.ASSET,
|
||||
self.TASK,
|
||||
"**")
|
||||
expected_dir_base = os.path.join(published_dir_base,
|
||||
published_dir_base = output_folder_url
|
||||
expected_dir_base = os.path.join(download_test_data,
|
||||
"expected")
|
||||
expected_dir = os.path.join(expected_dir_base,
|
||||
self.PROJECT,
|
||||
self.ASSET,
|
||||
self.TASK,
|
||||
"**")
|
||||
print("Comparing published:'{}' : expected:'{}'".format(published_dir,
|
||||
expected_dir))
|
||||
published = set(f.replace(published_dir_base, '') for f in
|
||||
glob.glob(published_dir, recursive=True) if
|
||||
f != published_dir_base and os.path.exists(f))
|
||||
expected = set(f.replace(expected_dir_base, '') for f in
|
||||
glob.glob(expected_dir, recursive=True) if
|
||||
f != expected_dir_base and os.path.exists(f))
|
||||
|
||||
not_matched = expected.difference(published)
|
||||
assert not not_matched, "Missing {} files".format(not_matched)
|
||||
print("Comparing published:'{}' : expected:'{}'".format(
|
||||
published_dir_base, expected_dir_base))
|
||||
published = set(f.replace(published_dir_base, '') for f in
|
||||
glob.glob(published_dir_base + "\\**", recursive=True)
|
||||
if f != published_dir_base and os.path.exists(f))
|
||||
expected = set(f.replace(expected_dir_base, '') for f in
|
||||
glob.glob(expected_dir_base + "\\**", recursive=True)
|
||||
if f != expected_dir_base and os.path.exists(f))
|
||||
|
||||
not_matched = expected.symmetric_difference(published)
|
||||
assert not not_matched, "Missing {} files".format(
|
||||
"\n".join(sorted(not_matched)))
|
||||
|
||||
|
||||
class HostFixtures(PublishTest):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue