[Automated] Merged develop into main

This commit is contained in:
ynbot 2024-01-03 04:25:15 +01:00 committed by GitHub
commit a78b3d94b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 40 deletions

View file

@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to OpenPype Tray
options:
- 3.18.2-nightly.5
- 3.18.2-nightly.4
- 3.18.2-nightly.3
- 3.18.2-nightly.2
@ -134,7 +135,6 @@ body:
- 3.15.5
- 3.15.5-nightly.2
- 3.15.5-nightly.1
- 3.15.4
validations:
required: true
- type: dropdown

View file

@ -34,6 +34,11 @@ class ExtractReviewIntermediates(publish.Extractor):
nuke_publish = project_settings["nuke"]["publish"]
deprecated_setting = nuke_publish["ExtractReviewDataMov"]
current_setting = nuke_publish.get("ExtractReviewIntermediates")
if not deprecated_setting["enabled"] and (
not current_setting["enabled"]
):
cls.enabled = False
if deprecated_setting["enabled"]:
# Use deprecated settings if they are still enabled
cls.viewer_lut_raw = deprecated_setting["viewer_lut_raw"]

View file

@ -13,7 +13,7 @@ class DJVViewAction(BaseAction):
description = "DJV View Launcher"
icon = statics_icon("app_icons", "djvView.png")
type = 'Application'
type = "Application"
allowed_types = [
"cin", "dpx", "avi", "dv", "gif", "flv", "mkv", "mov", "mpg", "mpeg",
@ -60,7 +60,7 @@ class DJVViewAction(BaseAction):
return False
def interface(self, session, entities, event):
if event['data'].get('values', {}):
if event["data"].get("values", {}):
return
entity = entities[0]
@ -70,32 +70,32 @@ class DJVViewAction(BaseAction):
if entity_type == "assetversion":
if (
entity[
'components'
][0]['file_type'][1:] in self.allowed_types
"components"
][0]["file_type"][1:] in self.allowed_types
):
versions.append(entity)
else:
master_entity = entity
if entity_type == "task":
master_entity = entity['parent']
master_entity = entity["parent"]
for asset in master_entity['assets']:
for version in asset['versions']:
for asset in master_entity["assets"]:
for version in asset["versions"]:
# Get only AssetVersion of selected task
if (
entity_type == "task" and
version['task']['id'] != entity['id']
version["task"]["id"] != entity["id"]
):
continue
# Get only components with allowed type
filetype = version['components'][0]['file_type']
filetype = version["components"][0]["file_type"]
if filetype[1:] in self.allowed_types:
versions.append(version)
if len(versions) < 1:
return {
'success': False,
'message': 'There are no Asset Versions to open.'
"success": False,
"message": "There are no Asset Versions to open."
}
# TODO sort them (somehow?)
@ -134,68 +134,68 @@ class DJVViewAction(BaseAction):
last_available = None
select_value = None
for version in versions:
for component in version['components']:
for component in version["components"]:
label = base_label.format(
str(version['version']).zfill(3),
version['asset']['type']['name'],
component['name']
str(version["version"]).zfill(3),
version["asset"]["type"]["name"],
component["name"]
)
try:
location = component[
'component_locations'
][0]['location']
"component_locations"
][0]["location"]
file_path = location.get_filesystem_path(component)
except Exception:
file_path = component[
'component_locations'
][0]['resource_identifier']
"component_locations"
][0]["resource_identifier"]
if os.path.isdir(os.path.dirname(file_path)):
last_available = file_path
if component['name'] == default_component:
if component["name"] == default_component:
select_value = file_path
version_items.append(
{'label': label, 'value': file_path}
{"label": label, "value": file_path}
)
if len(version_items) == 0:
return {
'success': False,
'message': (
'There are no Asset Versions with accessible path.'
"success": False,
"message": (
"There are no Asset Versions with accessible path."
)
}
item = {
'label': 'Items to view',
'type': 'enumerator',
'name': 'path',
'data': sorted(
"label": "Items to view",
"type": "enumerator",
"name": "path",
"data": sorted(
version_items,
key=itemgetter('label'),
key=itemgetter("label"),
reverse=True
)
}
if select_value is not None:
item['value'] = select_value
item["value"] = select_value
else:
item['value'] = last_available
item["value"] = last_available
items.append(item)
return {'items': items}
return {"items": items}
def launch(self, session, entities, event):
"""Callback method for DJVView action."""
# Launching application
event_data = event["data"]
if "values" not in event_data:
event_values = event["data"].get("values")
if not event_values:
return
djv_app_name = event_data["djv_app_name"]
app = self.applicaion_manager.applications.get(djv_app_name)
djv_app_name = event_values["djv_app_name"]
app = self.application_manager.applications.get(djv_app_name)
executable = None
if app is not None:
executable = app.find_executable()
@ -206,18 +206,21 @@ class DJVViewAction(BaseAction):
"message": "Couldn't find DJV executable."
}
filpath = os.path.normpath(event_data["values"]["path"])
filpath = os.path.normpath(event_values["path"])
cmd = [
# DJV path
executable,
str(executable),
# PATH TO COMPONENT
filpath
]
try:
# Run DJV with these commands
subprocess.Popen(cmd)
_process = subprocess.Popen(cmd)
# Keep process in memory for some time
time.sleep(0.1)
except FileNotFoundError:
return {
"success": False,