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

Commit

Permalink
Merge branch 'develop' into bugfix/traypublish-editorial-avoid-audio-…
Browse files Browse the repository at this point in the history
…track
  • Loading branch information
jakubjezek001 authored Feb 7, 2024
2 parents 0bbe25f + 4243ee4 commit 2669a6d
Show file tree
Hide file tree
Showing 37 changed files with 854 additions and 161 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ body:
label: Version
description: What version are you running? Look to OpenPype Tray
options:
- 3.18.7-nightly.2
- 3.18.7-nightly.1
- 3.18.6
- 3.18.6-nightly.2
- 3.18.6-nightly.1
- 3.18.5
- 3.18.5-nightly.3
Expand Down Expand Up @@ -131,10 +135,6 @@ body:
- 3.15.10-nightly.1
- 3.15.9
- 3.15.9-nightly.2
- 3.15.9-nightly.1
- 3.15.8
- 3.15.8-nightly.3
- 3.15.8-nightly.2
validations:
required: true
- type: dropdown
Expand Down
126 changes: 126 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,132 @@
# Changelog


## [3.18.6](https://github.com/ynput/OpenPype/tree/3.18.6)


[Full Changelog](https://github.com/ynput/OpenPype/compare/3.18.5...3.18.6)

### **🚀 Enhancements**


<details>
<summary>AYON: Use `SettingsField` from ayon server <a href="https://github.com/ynput/OpenPype/pull/6173">#6173</a></summary>

This is preparation for new version of pydantic which will require to customize the field class for AYON purposes as raw pydantic Field could not be used.


___

</details>


<details>
<summary>Nuke: Expose write knobs - OP-7592 <a href="https://github.com/ynput/OpenPype/pull/6137">#6137</a></summary>

This PR adds `exposed_knobs` to the creator plugins settings at `ayon+settings://nuke/create/CreateWriteRender/exposed_knobs`.When exposed knobs will be linked from the write node to the outside publish group, for users to adjust.


___

</details>


<details>
<summary>AYON: Remove kitsu addon <a href="https://github.com/ynput/OpenPype/pull/6172">#6172</a></summary>

Removed kitsu addon from server addons because already has own repository.


___

</details>

### **🐛 Bug fixes**


<details>
<summary>Fusion: provide better logging for validate saver crash due type error <a href="https://github.com/ynput/OpenPype/pull/6082">#6082</a></summary>

Handles reported issue for `NoneType` error thrown in conversion `int(tool["Comments"][frame])`. It is most likely happening when saver node has no input connections.There is a validator for that, but it might be not obvious, that this error is caused by missing input connections and it has been already reported by `"Validate Saver Has Input"`.


___

</details>


<details>
<summary>Workfile Template Builder: Use correct variable in create placeholder <a href="https://github.com/ynput/OpenPype/pull/6141">#6141</a></summary>

Use correct variable where failed instances are stored for validation.


___

</details>


<details>
<summary>ExtractOIIOTranscode: Missing product_names to subsets conversion <a href="https://github.com/ynput/OpenPype/pull/6159">#6159</a></summary>

The `Product Names` filtering should be fixed with this.


___

</details>


<details>
<summary>Blender: Fix missing animation data when updating blend assets <a href="https://github.com/ynput/OpenPype/pull/6165">#6165</a></summary>

Fix missing animation data when updating blend assets.


___

</details>


<details>
<summary>TrayPublisher: Pre-fill of version works in AYON <a href="https://github.com/ynput/OpenPype/pull/6180">#6180</a></summary>

Use `folderPath` instead of `asset` in AYON mode to calculate next available version.


___

</details>

### **🔀 Refactored code**


<details>
<summary>Chore: remove Muster <a href="https://github.com/ynput/OpenPype/pull/6085">#6085</a></summary>

Muster isn't maintained for a long time and it wasn't working anyway. This is removing related code from the code base. If there is renewed interest in Muster, it needs to be re-implemented in modern AYON compatible way.


___

</details>

### **Merged pull requests**


<details>
<summary>Maya: change label in the render settings to be more readable <a href="https://github.com/ynput/OpenPype/pull/6134">#6134</a></summary>

AYON replacement for #5713.


___

</details>




## [3.18.5](https://github.com/ynput/OpenPype/tree/3.18.5)


Expand Down
4 changes: 3 additions & 1 deletion openpype/hosts/nuke/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
get_node_data,
set_node_data,
update_node_data,
create_write_node
create_write_node,
link_knobs
)
from .utils import (
colorspace_exists_on_node,
Expand Down Expand Up @@ -95,6 +96,7 @@
"set_node_data",
"update_node_data",
"create_write_node",
"link_knobs",

"colorspace_exists_on_node",
"get_colorspace_list",
Expand Down
24 changes: 24 additions & 0 deletions openpype/hosts/nuke/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3499,3 +3499,27 @@ def create_camera_node_by_version():
return nuke.createNode("Camera4")
else:
return nuke.createNode("Camera2")


def link_knobs(knobs, node, group_node):
"""Link knobs from inside `group_node`"""

missing_knobs = []
for knob in knobs:
if knob in group_node.knobs():
continue

if knob not in node.knobs().keys():
missing_knobs.append(knob)

link = nuke.Link_Knob("")
link.makeLink(node.name(), knob)
link.setName(knob)
link.setFlag(0x1000)
group_node.addKnob(link)

if missing_knobs:
raise ValueError(
"Write node exposed knobs missing:\n\n{}\n\nPlease review"
" project settings.".format("\n".join(missing_knobs))
)
11 changes: 10 additions & 1 deletion openpype/hosts/nuke/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
get_view_process_node,
get_viewer_config_from_string,
deprecated,
get_filenames_without_hash
get_filenames_without_hash,
link_knobs
)
from .pipeline import (
list_instances,
Expand Down Expand Up @@ -1344,3 +1345,11 @@ def _remove_old_knobs(node):
node.removeKnob(knob)
except ValueError:
pass


def exposed_write_knobs(settings, plugin_name, instance_node):
exposed_knobs = settings["nuke"]["create"][plugin_name]["exposed_knobs"]
if exposed_knobs:
instance_node.addKnob(nuke.Text_Knob('', 'Write Knobs'))
write_node = nuke.allNodes(group=instance_node, filter="Write")[0]
link_knobs(exposed_knobs, write_node, instance_node)
5 changes: 5 additions & 0 deletions openpype/hosts/nuke/plugins/create/create_write_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
EnumDef
)
from openpype.hosts.nuke import api as napi
from openpype.hosts.nuke.api.plugin import exposed_write_knobs


class CreateWriteImage(napi.NukeWriteCreator):
Expand Down Expand Up @@ -132,6 +133,10 @@ def create(self, subset_name, instance_data, pre_create_data):
instance.data_to_store()
)

exposed_write_knobs(
self.project_settings, self.__class__.__name__, instance_node
)

return instance

except Exception as er:
Expand Down
5 changes: 5 additions & 0 deletions openpype/hosts/nuke/plugins/create/create_write_prerender.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
BoolDef
)
from openpype.hosts.nuke import api as napi
from openpype.hosts.nuke.api.plugin import exposed_write_knobs


class CreateWritePrerender(napi.NukeWriteCreator):
Expand Down Expand Up @@ -119,6 +120,10 @@ def create(self, subset_name, instance_data, pre_create_data):
instance.data_to_store()
)

exposed_write_knobs(
self.project_settings, self.__class__.__name__, instance_node
)

return instance

except Exception as er:
Expand Down
5 changes: 5 additions & 0 deletions openpype/hosts/nuke/plugins/create/create_write_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
BoolDef
)
from openpype.hosts.nuke import api as napi
from openpype.hosts.nuke.api.plugin import exposed_write_knobs


class CreateWriteRender(napi.NukeWriteCreator):
Expand Down Expand Up @@ -113,6 +114,10 @@ def create(self, subset_name, instance_data, pre_create_data):
instance.data_to_store()
)

exposed_write_knobs(
self.project_settings, self.__class__.__name__, instance_node
)

return instance

except Exception as er:
Expand Down
77 changes: 77 additions & 0 deletions openpype/hosts/nuke/plugins/publish/validate_exposed_knobs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import pyblish.api

from openpype.pipeline.publish import get_errored_instances_from_context
from openpype.hosts.nuke.api.lib import link_knobs
from openpype.pipeline.publish import (
OptionalPyblishPluginMixin,
PublishValidationError
)


class RepairExposedKnobs(pyblish.api.Action):
label = "Repair"
on = "failed"
icon = "wrench"

def process(self, context, plugin):
instances = get_errored_instances_from_context(context)

for instance in instances:
child_nodes = (
instance.data.get("transientData", {}).get("childNodes")
or instance
)

write_group_node = instance.data["transientData"]["node"]
# get write node from inside of group
write_node = None
for x in child_nodes:
if x.Class() == "Write":
write_node = x

plugin_name = plugin.families_mapping[instance.data["family"]]
nuke_settings = instance.context.data["project_settings"]["nuke"]
create_settings = nuke_settings["create"][plugin_name]
exposed_knobs = create_settings["exposed_knobs"]
link_knobs(exposed_knobs, write_node, write_group_node)


class ValidateExposedKnobs(
OptionalPyblishPluginMixin,
pyblish.api.InstancePlugin
):
""" Validate write node exposed knobs.
Compare exposed linked knobs to settings.
"""

order = pyblish.api.ValidatorOrder
optional = True
families = ["render", "prerender", "image"]
label = "Validate Exposed Knobs"
actions = [RepairExposedKnobs]
hosts = ["nuke"]
families_mapping = {
"render": "CreateWriteRender",
"prerender": "CreateWritePrerender",
"image": "CreateWriteImage"
}

def process(self, instance):
if not self.is_active(instance.data):
return

plugin = self.families_mapping[instance.data["family"]]
group_node = instance.data["transientData"]["node"]
nuke_settings = instance.context.data["project_settings"]["nuke"]
create_settings = nuke_settings["create"][plugin]
exposed_knobs = create_settings["exposed_knobs"]
unexposed_knobs = []
for knob in exposed_knobs:
if knob not in group_node.knobs():
unexposed_knobs.append(knob)

if unexposed_knobs:
raise PublishValidationError(
"Missing exposed knobs: {}".format(unexposed_knobs)
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from openpype.pipeline.publish import (
PublishXmlValidationError,
OptionalPyblishPluginMixin,
OptionalPyblishPluginMixin
)


Expand Down
5 changes: 2 additions & 3 deletions openpype/hosts/photoshop/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import contextlib
import traceback

from qtpy import QtWidgets

from openpype.lib import env_value_to_bool, Logger
from openpype.modules import ModulesManager
from openpype.pipeline import install_host
from openpype.tools.utils import host_tools
from openpype.tools.utils import get_openpype_qt_app
from openpype.tests.lib import is_in_tests

from .launch_logic import ProcessLauncher, stub
Expand All @@ -30,7 +29,7 @@ def main(*subprocess_args):

# coloring in StdOutBroker
os.environ["OPENPYPE_LOG_NO_COLORS"] = "False"
app = QtWidgets.QApplication([])
app = get_openpype_qt_app()
app.setQuitOnLastWindowClosed(False)

launcher = ProcessLauncher(subprocess_args)
Expand Down
Loading

0 comments on commit 2669a6d

Please sign in to comment.