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 feature/1658-editorial-conform-assets-val…
Browse files Browse the repository at this point in the history
…idator
  • Loading branch information
jakubjezek001 committed Jun 11, 2021
2 parents 3519287 + 1f41312 commit f8cf55d
Show file tree
Hide file tree
Showing 150 changed files with 24,228 additions and 257 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/nightly_merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nightly Merge
name: Dev -> Main

on:
schedule:
Expand All @@ -14,10 +14,16 @@ jobs:
- name: 🚛 Checkout Code
uses: actions/checkout@v2

- name: 🔨 Merge main back to develop
- name: 🔨 Merge develop to main
uses: everlytic/branch-merge@1.1.0
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
source_ref: 'develop'
target_branch: 'main'
commit_message_template: '[Automated] Merged {source_ref} into {target_branch}'
commit_message_template: '[Automated] Merged {source_ref} into {target_branch}'

- name: Invoke pre-release workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Nightly Prerelease
token: ${{ secrets.ADMIN_TOKEN }}
3 changes: 0 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: Nightly Prerelease

on:
push:
branches: [main]
workflow_dispatch:


jobs:
create_nightly:
runs-on: ubuntu-latest
if: github.actor != 'pypebot'

steps:
- name: 🚛 Checkout Code
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Changelog

## [3.1.0-nightly.1](https://github.com/pypeclub/OpenPype/tree/HEAD)
## [3.1.0-nightly.2](https://github.com/pypeclub/OpenPype/tree/HEAD)

[Full Changelog](https://github.com/pypeclub/OpenPype/compare/3.0.0...HEAD)

#### 🚀 Enhancements

- Nuke - Publish simplification [\#1653](https://github.com/pypeclub/OpenPype/pull/1653)
- \#1333 - added tooltip hints to Pyblish buttons [\#1649](https://github.com/pypeclub/OpenPype/pull/1649)

#### 🐛 Bug fixes

- Mac launch arguments fix [\#1660](https://github.com/pypeclub/OpenPype/pull/1660)
- Fix missing dbm python module [\#1652](https://github.com/pypeclub/OpenPype/pull/1652)
- Transparent branches in view on Mac [\#1648](https://github.com/pypeclub/OpenPype/pull/1648)
- Add asset on task item [\#1646](https://github.com/pypeclub/OpenPype/pull/1646)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
OpenPype
====

[![documentation](https://github.com/pypeclub/pype/actions/workflows/documentation.yml/badge.svg)](https://github.com/pypeclub/pype/actions/workflows/documentation.yml) ![GitHub Requirements](https://img.shields.io/requires/github/pypeclub/pype?labelColor=303846) ![GitHub VFX Platform](https://img.shields.io/badge/vfx%20platform-2021-lightgrey?labelColor=303846)
[![documentation](https://github.com/pypeclub/pype/actions/workflows/documentation.yml/badge.svg)](https://github.com/pypeclub/pype/actions/workflows/documentation.yml) ![GitHub VFX Platform](https://img.shields.io/badge/vfx%20platform-2021-lightgrey?labelColor=303846)



Expand Down
2 changes: 1 addition & 1 deletion igniter/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
"""Definition of Igniter version."""

__version__ = "1.0.0"
__version__ = "1.0.1"
2 changes: 1 addition & 1 deletion openpype/hooks/pre_mac_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def execute(self):
if len(self.launch_context.launch_args) > 1:
self.launch_context.launch_args.insert(1, "--args")
# Prepend open arguments
self.launch_context.launch_args.insert(0, ["open", "-a"])
self.launch_context.launch_args.insert(0, ["open", "-na"])
59 changes: 58 additions & 1 deletion openpype/hosts/hiero/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_track_items(
if not item.isEnabled():
continue
if track_item_name:
if item.name() in track_item_name:
if track_item_name in item.name():
return item
# make sure only track items with correct track names are added
if track_name and track_name in track.name():
Expand Down Expand Up @@ -949,6 +949,54 @@ def sync_clip_name_to_data_asset(track_items_list):
print("asset was changed in clip: {}".format(ti_name))


def check_inventory_versions():
"""
Actual version color idetifier of Loaded containers
Check all track items and filter only
Loader nodes for its version. It will get all versions from database
and check if the node is having actual version. If not then it will color
it to red.
"""
from . import parse_container
from avalon import io

# presets
clip_color_last = "green"
clip_color = "red"

# get all track items from current timeline
for track_item in get_track_items():
container = parse_container(track_item)

if container:
# get representation from io
representation = io.find_one({
"type": "representation",
"_id": io.ObjectId(container["representation"])
})

# Get start frame from version data
version = io.find_one({
"type": "version",
"_id": representation["parent"]
})

# get all versions in list
versions = io.find({
"type": "version",
"parent": version["parent"]
}).distinct('name')

max_version = max(versions)

# set clip colour
if version.get("name") == max_version:
track_item.source().binItem().setColor(clip_color_last)
else:
track_item.source().binItem().setColor(clip_color)


def selection_changed_timeline(event):
"""Callback on timeline to check if asset in data is the same as clip name.
Expand All @@ -958,9 +1006,15 @@ def selection_changed_timeline(event):
timeline_editor = event.sender
selection = timeline_editor.selection()

selection = [ti for ti in selection
if isinstance(ti, hiero.core.TrackItem)]

# run checking function
sync_clip_name_to_data_asset(selection)

# also mark old versions of loaded containers
check_inventory_versions()


def before_project_save(event):
track_items = get_track_items(
Expand All @@ -972,3 +1026,6 @@ def before_project_save(event):

# run checking function
sync_clip_name_to_data_asset(track_items)

# also mark old versions of loaded containers
check_inventory_versions()
54 changes: 32 additions & 22 deletions openpype/hosts/nuke/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,18 +298,21 @@ def create_write_node(name, data, input=None, prenodes=None, review=True):
review (bool): adding review knob
Example:
prenodes = [(
"NameNode", # string
"NodeClass", # string
( # OrderDict: knob and values pairs
("knobName", "knobValue"),
("knobName", "knobValue")
),
( # list outputs
"firstPostNodeName",
"secondPostNodeName"
)
)
prenodes = [
{
"nodeName": {
"class": "" # string
"knobs": [
("knobName": value),
...
],
"dependent": [
following_node_01,
...
]
}
},
...
]
Return:
Expand Down Expand Up @@ -385,35 +388,42 @@ def create_write_node(name, data, input=None, prenodes=None, review=True):
prev_node.hideControlPanel()
# creating pre-write nodes `prenodes`
if prenodes:
for name, klass, properties, set_output_to in prenodes:
for node in prenodes:
# get attributes
name = node["name"]
klass = node["class"]
knobs = node["knobs"]
dependent = node["dependent"]

# create node
now_node = nuke.createNode(klass, "name {}".format(name))
now_node.hideControlPanel()

# add data to knob
for k, v in properties:
for _knob in knobs:
knob, value = _knob
try:
now_node[k].value()
now_node[knob].value()
except NameError:
log.warning(
"knob `{}` does not exist on node `{}`".format(
k, now_node["name"].value()
knob, now_node["name"].value()
))
continue

if k and v:
now_node[k].setValue(str(v))
if knob and value:
now_node[knob].setValue(value)

# connect to previous node
if set_output_to:
if isinstance(set_output_to, (tuple or list)):
for i, node_name in enumerate(set_output_to):
if dependent:
if isinstance(dependent, (tuple or list)):
for i, node_name in enumerate(dependent):
input_node = nuke.createNode(
"Input", "name {}".format(node_name))
input_node.hideControlPanel()
now_node.setInput(1, input_node)

elif isinstance(set_output_to, str):
elif isinstance(dependent, str):
input_node = nuke.createNode(
"Input", "name {}".format(node_name))
input_node.hideControlPanel()
Expand Down
20 changes: 19 additions & 1 deletion openpype/hosts/nuke/plugins/create/create_write_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,28 @@ def process(self):
"fpath_template": ("{work}/renders/nuke/{subset}"
"/{subset}.{frame}.{ext}")})

# add crop node to cut off all outside of format bounding box
_prenodes = [
{
"name": "Crop01",
"class": "Crop",
"knobs": [
("box", [
0.0,
0.0,
selected_node.width(),
selected_node.height()
])
],
"dependent": None
}
]

write_node = lib.create_write_node(
self.data["subset"],
write_data,
input=selected_node)
input=selected_node,
prenodes=_prenodes)

# relinking to collected connections
for i, input in enumerate(inputs):
Expand Down
106 changes: 0 additions & 106 deletions openpype/hosts/nuke/plugins/publish/validate_write_bounding_box.py

This file was deleted.

Loading

0 comments on commit f8cf55d

Please sign in to comment.