mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
use ranges
This commit is contained in:
parent
6bd3f87fbe
commit
e69e1f76c8
3 changed files with 7 additions and 11 deletions
|
|
@ -150,10 +150,10 @@ def set_render_frame_range(start_frame, end_frame):
|
||||||
Todo:
|
Todo:
|
||||||
Current type is hard-coded, there should be a custom setting for this.
|
Current type is hard-coded, there should be a custom setting for this.
|
||||||
"""
|
"""
|
||||||
rt.rendTimeType = 4
|
rt.rendTimeType = 3
|
||||||
if start_frame is not None and end_frame is not None:
|
if start_frame is not None and end_frame is not None:
|
||||||
frame_range = "{0}-{1}".format(start_frame, end_frame)
|
rt.rendStart = int(start_frame)
|
||||||
rt.rendPickupFrames = frame_range
|
rt.rendEnd = int(end_frame)
|
||||||
|
|
||||||
|
|
||||||
def get_multipass_setting(project_setting=None):
|
def get_multipass_setting(project_setting=None):
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ class CollectRender(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
self.log.debug(f"Setting {version_int} to context.")
|
self.log.debug(f"Setting {version_int} to context.")
|
||||||
context.data["version"] = version_int
|
context.data["version"] = version_int
|
||||||
pattern = r"^(?P<start>-?[0-9]+)(?:(?:-)(?P<end>-?[0-9]+))?$"
|
|
||||||
match = re.match(pattern, rt.rendPickupFrames)
|
|
||||||
# setup the plugin as 3dsmax for the internal renderer
|
# setup the plugin as 3dsmax for the internal renderer
|
||||||
data = {
|
data = {
|
||||||
"subset": instance.name,
|
"subset": instance.name,
|
||||||
|
|
@ -61,8 +59,8 @@ class CollectRender(pyblish.api.InstancePlugin):
|
||||||
"source": filepath,
|
"source": filepath,
|
||||||
"expectedFiles": render_layer_files,
|
"expectedFiles": render_layer_files,
|
||||||
"plugin": "3dsmax",
|
"plugin": "3dsmax",
|
||||||
"frameStart": int(match.group("start")),
|
"frameStart": int(rt.rendStart),
|
||||||
"frameEnd": int(match.group("end")),
|
"frameEnd": int(rt.rendEnd),
|
||||||
"version": version_int,
|
"version": version_int,
|
||||||
"farm": True
|
"farm": True
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,5 @@ class ValidateFrameRange(pyblish.api.InstancePlugin,
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def repair(cls, instance):
|
def repair(cls, instance):
|
||||||
start = instance.context.data.get("frameStart")
|
rt.rendStart = instance.context.data.get("frameStart")
|
||||||
end = instance.context.data.get("frameEnd")
|
rt.rendEnd = instance.context.data.get("frameEnd")
|
||||||
frame_range = "{0}-{1}".format(start, end)
|
|
||||||
rt.rendPickupFrames = frame_range
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue