Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
[Automated] Merged develop into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ynbot authored Jan 27, 2024
2 parents 20e089c + f3b1570 commit 29a3e4c
Show file tree
Hide file tree
Showing 135 changed files with 2,398 additions and 3,562 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to OpenPype Tray
options:
- 3.18.5
- 3.18.5-nightly.3
- 3.18.5-nightly.2
- 3.18.5-nightly.1
Expand Down Expand Up @@ -134,7 +135,6 @@ body:
- 3.15.8-nightly.3
- 3.15.8-nightly.2
- 3.15.8-nightly.1
- 3.15.7
validations:
required: true
- type: dropdown
Expand Down
2 changes: 2 additions & 0 deletions openpype/hosts/blender/plugins/load/load_blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def exec_update(self, container: Dict, representation: Dict):
# Restore the actions
for obj in asset_group.children_recursive:
if obj.name in actions:
if not obj.animation_data:
obj.animation_data_create()
obj.animation_data.action = actions[obj.name]

# Restore the old data, but reset memebers, as they don't exist anymore
Expand Down
115 changes: 63 additions & 52 deletions openpype/hosts/fusion/plugins/publish/validate_saver_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,6 @@
from openpype.hosts.fusion.api import comp_lock_and_undo_chunk


def get_tool_resolution(tool, frame):
"""Return the 2D input resolution to a Fusion tool
If the current tool hasn't been rendered its input resolution
hasn't been saved. To combat this, add an expression in
the comments field to read the resolution
Args
tool (Fusion Tool): The tool to query input resolution
frame (int): The frame to query the resolution on.
Returns:
tuple: width, height as 2-tuple of integers
"""
comp = tool.Composition

# False undo removes the undo-stack from the undo list
with comp_lock_and_undo_chunk(comp, "Read resolution", False):
# Save old comment
old_comment = ""
has_expression = False
if tool["Comments"][frame] != "":
if tool["Comments"].GetExpression() is not None:
has_expression = True
old_comment = tool["Comments"].GetExpression()
tool["Comments"].SetExpression(None)
else:
old_comment = tool["Comments"][frame]
tool["Comments"][frame] = ""

# Get input width
tool["Comments"].SetExpression("self.Input.OriginalWidth")
width = int(tool["Comments"][frame])

# Get input height
tool["Comments"].SetExpression("self.Input.OriginalHeight")
height = int(tool["Comments"][frame])

# Reset old comment
tool["Comments"].SetExpression(None)
if has_expression:
tool["Comments"].SetExpression(old_comment)
else:
tool["Comments"][frame] = old_comment

return width, height


class ValidateSaverResolution(
pyblish.api.InstancePlugin, OptionalPyblishPluginMixin
):
Expand Down Expand Up @@ -87,19 +38,79 @@ def process(self, instance):

@classmethod
def get_invalid(cls, instance):
resolution = cls.get_resolution(instance)
saver = instance.data["tool"]
try:
resolution = cls.get_resolution(instance)
except PublishValidationError:
resolution = None
expected_resolution = cls.get_expected_resolution(instance)
if resolution != expected_resolution:
saver = instance.data["tool"]
return [saver]

@classmethod
def get_resolution(cls, instance):
saver = instance.data["tool"]
first_frame = instance.data["frameStartHandle"]
return get_tool_resolution(saver, frame=first_frame)
return cls.get_tool_resolution(saver, frame=first_frame)

@classmethod
def get_expected_resolution(cls, instance):
data = instance.data["assetEntity"]["data"]
return data["resolutionWidth"], data["resolutionHeight"]

@classmethod
def get_tool_resolution(cls, tool, frame):
"""Return the 2D input resolution to a Fusion tool
If the current tool hasn't been rendered its input resolution
hasn't been saved. To combat this, add an expression in
the comments field to read the resolution
Args
tool (Fusion Tool): The tool to query input resolution
frame (int): The frame to query the resolution on.
Returns:
tuple: width, height as 2-tuple of integers
"""
comp = tool.Composition

# False undo removes the undo-stack from the undo list
with comp_lock_and_undo_chunk(comp, "Read resolution", False):
# Save old comment
old_comment = ""
has_expression = False

if tool["Comments"][frame] not in ["", None]:
if tool["Comments"].GetExpression() is not None:
has_expression = True
old_comment = tool["Comments"].GetExpression()
tool["Comments"].SetExpression(None)
else:
old_comment = tool["Comments"][frame]
tool["Comments"][frame] = ""
# Get input width
tool["Comments"].SetExpression("self.Input.OriginalWidth")
if tool["Comments"][frame] is None:
raise PublishValidationError(
"Cannot get resolution info for frame '{}'.\n\n "
"Please check that saver has connected input.".format(
frame
)
)

width = int(tool["Comments"][frame])

# Get input height
tool["Comments"].SetExpression("self.Input.OriginalHeight")
height = int(tool["Comments"][frame])

# Reset old comment
tool["Comments"].SetExpression(None)
if has_expression:
tool["Comments"].SetExpression(old_comment)
else:
tool["Comments"][frame] = old_comment

return width, height
12 changes: 6 additions & 6 deletions openpype/lib/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ def requests_post(*args, **kwargs):
"""Wrap request post method.
Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment
variable is found. This is useful when Deadline or Muster server are
running with self-signed certificates and their certificate is not
variable is found. This is useful when Deadline server is
running with self-signed certificates and its certificate is not
added to trusted certificates on client machines.
Warning:
Disabling SSL certificate validation is defeating one line
of defense SSL is providing and it is not recommended.
of defense SSL is providing, and it is not recommended.
"""
if "verify" not in kwargs:
Expand All @@ -24,13 +24,13 @@ def requests_get(*args, **kwargs):
"""Wrap request get method.
Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment
variable is found. This is useful when Deadline or Muster server are
running with self-signed certificates and their certificate is not
variable is found. This is useful when Deadline server is
running with self-signed certificates and its certificate is not
added to trusted certificates on client machines.
Warning:
Disabling SSL certificate validation is defeating one line
of defense SSL is providing and it is not recommended.
of defense SSL is providing, and it is not recommended.
"""
if "verify" not in kwargs:
Expand Down
1 change: 0 additions & 1 deletion openpype/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,6 @@ class TrayModulesManager(ModulesManager):
"user",
"ftrack",
"kitsu",
"muster",
"launcher_tool",
"avalon",
"clockify",
Expand Down
8 changes: 4 additions & 4 deletions openpype/modules/deadline/abstract_submit_deadline.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def requests_post(*args, **kwargs):
"""Wrap request post method.
Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment
variable is found. This is useful when Deadline or Muster server are
running with self-signed certificates and their certificate is not
variable is found. This is useful when Deadline server is
running with self-signed certificates and its certificate is not
added to trusted certificates on client machines.
Warning:
Expand All @@ -55,8 +55,8 @@ def requests_get(*args, **kwargs):
"""Wrap request get method.
Disabling SSL certificate validation if ``DONT_VERIFY_SSL`` environment
variable is found. This is useful when Deadline or Muster server are
running with self-signed certificates and their certificate is not
variable is found. This is useful when Deadline server is
running with self-signed certificates and its certificate is not
added to trusted certificates on client machines.
Warning:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ class ProcessSubmittedCacheJobOnFarm(pyblish.api.InstancePlugin,
def _submit_deadline_post_job(self, instance, job):
"""Submit publish job to Deadline.
Deadline specific code separated from :meth:`process` for sake of
more universal code. Muster post job is sent directly by Muster
submitter, so this type of code isn't necessary for it.
Returns:
(str): deadline_publish_job_id
"""
Expand Down
19 changes: 4 additions & 15 deletions openpype/modules/deadline/plugins/publish/submit_publish_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,15 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
publish.ColormanagedPyblishPluginMixin):
"""Process Job submitted on farm.
These jobs are dependent on a deadline or muster job
These jobs are dependent on a deadline job
submission prior to this plug-in.
- In case of Deadline, it creates dependent job on farm publishing
rendered image sequence.
- In case of Muster, there is no need for such thing as dependent job,
post action will be executed and rendered sequence will be published.
It creates dependent job on farm publishing rendered image sequence.
Options in instance.data:
- deadlineSubmissionJob (dict, Required): The returned .json
data from the job submission to deadline.
- musterSubmissionJob (dict, Required): same as deadline.
- outputDir (str, Required): The output directory where the metadata
file should be generated. It's assumed that this will also be
final folder containing the output files.
Expand Down Expand Up @@ -161,10 +155,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
def _submit_deadline_post_job(self, instance, job, instances):
"""Submit publish job to Deadline.
Deadline specific code separated from :meth:`process` for sake of
more universal code. Muster post job is sent directly by Muster
submitter, so this type of code isn't necessary for it.
Returns:
(str): deadline_publish_job_id
"""
Expand Down Expand Up @@ -586,9 +576,8 @@ def process(self, instance):

render_job = instance.data.pop("deadlineSubmissionJob", None)
if not render_job and instance.data.get("tileRendering") is False:
raise AssertionError(("Cannot continue without valid Deadline "
"or Muster submission."))

raise AssertionError(("Cannot continue without valid "
"Deadline submission."))
if not render_job:
import getpass

Expand Down
6 changes: 0 additions & 6 deletions openpype/modules/muster/__init__.py

This file was deleted.

Loading

0 comments on commit 29a3e4c

Please sign in to comment.