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/overscan_color_extract_review
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjezek001 committed Jun 16, 2021
2 parents 9aec376 + df37372 commit 8e0080f
Show file tree
Hide file tree
Showing 31 changed files with 801 additions and 206 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
uses: heinrichreimer/github-changelog-generator-action@v2.2
with:
token: ${{ secrets.ADMIN_TOKEN }}
breakingLabel: '#### 💥 Breaking'
enhancementLabel: '#### 🚀 Enhancements'
bugsLabel: '#### 🐛 Bug fixes'
deprecatedLabel: '#### ⚠️ Deprecations'
breakingLabel: '**💥 Breaking**'
enhancementLabel: '**🚀 Enhancements**'
bugsLabel: '**🐛 Bug fixes**'
deprecatedLabel: '**⚠️ Deprecations**'
addSections: '{"documentation":{"prefix":"### 📖 Documentation","labels":["documentation"]},"tests":{"prefix":"### ✅ Testing","labels":["tests"]}}'
issues: false
issuesWoLabels: false
Expand Down
116 changes: 72 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Stable Release

on:
push:
tags:
- '*[0-9].*[0-9].*[0-9]*'
release:
types:
- prereleased

jobs:
create_release:
Expand All @@ -23,35 +23,26 @@ jobs:
- name: Install Python requirements
run: pip install gitpython semver

- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
git config user.email ${{ secrets.CI_EMAIL }}
git config user.name ${{ secrets.CI_USER }}
git fetch
git checkout -b main origin/main
git tag -d ${GITHUB_REF#refs/*/}
git remote set-url --push origin https://pypebot:${{ secrets.ADMIN_TOKEN }}@github.com/pypeclub/openpype
git push origin --delete ${GITHUB_REF#refs/*/}
echo PREVIOUS_VERSION=`git describe --tags --match="[0-9]*" --abbrev=0` >> $GITHUB_ENV
- name: 💉 Inject new version into files
id: version
if: steps.version_type.outputs.type != 'skip'
run: |
python ./tools/ci_tools.py --version ${{ env.RELEASE_VERSION }}
echo ::set-output name=current_version::${GITHUB_REF#refs/*/}
RESULT=$(python ./tools/ci_tools.py --finalize ${GITHUB_REF#refs/*/})
LASTRELEASE=$(python ./tools/ci_tools.py --lastversion release)
echo ::set-output name=last_release::$LASTRELEASE
echo ::set-output name=release_tag::$RESULT
- name: "✏️ Generate full changelog"
if: steps.version_type.outputs.type != 'skip'
if: steps.version.outputs.release_tag != 'skip'
id: generate-full-changelog
uses: heinrichreimer/github-changelog-generator-action@v2.2
with:
token: ${{ secrets.ADMIN_TOKEN }}
breakingLabel: '#### 💥 Breaking'
enhancementLabel: '#### 🚀 Enhancements'
bugsLabel: '#### 🐛 Bug fixes'
deprecatedLabel: '#### ⚠️ Deprecations'
breakingLabel: '**💥 Breaking**'
enhancementLabel: '**🚀 Enhancements**'
bugsLabel: '**🐛 Bug fixes**'
deprecatedLabel: '**⚠️ Deprecations**'
addSections: '{"documentation":{"prefix":"### 📖 Documentation","labels":["documentation"]},"tests":{"prefix":"### ✅ Testing","labels":["tests"]}}'
issues: false
issuesWoLabels: false
Expand All @@ -64,39 +55,76 @@ jobs:
compareLink: true
stripGeneratorNotice: true
verbose: true
futureRelease: ${{ env.RELEASE_VERSION }}
futureRelease: ${{ steps.version.outputs.release_tag }}
excludeTagsRegex: "CI/.+"
releaseBranch: "main"

- name: "🖨️ Print changelog to console"
run: echo ${{ steps.generate-last-changelog.outputs.changelog }}

- name: 💾 Commit and Tag
id: git_commit
if: steps.version_type.outputs.type != 'skip'
if: steps.version.outputs.release_tag != 'skip'
run: |
git config user.email ${{ secrets.CI_EMAIL }}
git config user.name ${{ secrets.CI_USER }}
git add .
git commit -m "[Automated] Release"
tag_name="${{ env.RELEASE_VERSION }}"
git push
git tag -fa $tag_name -m "stable release"
git remote set-url --push origin https://pypebot:${{ secrets.ADMIN_TOKEN }}@github.com/pypeclub/openpype
git push origin $tag_name
tag_name="${{ steps.version.outputs.release_tag }}"
git tag -a $tag_name -m "stable release"
- name: 🔏 Push to protected main branch
if: steps.version.outputs.release_tag != 'skip'
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.ADMIN_TOKEN }}
branch: main
tags: true
unprotect_reviews: true

- name: "✏️ Generate last changelog"
if: steps.version.outputs.release_tag != 'skip'
id: generate-last-changelog
uses: heinrichreimer/github-changelog-generator-action@v2.2
with:
token: ${{ secrets.ADMIN_TOKEN }}
breakingLabel: '**💥 Breaking**'
enhancementLabel: '**🚀 Enhancements**'
bugsLabel: '**🐛 Bug fixes**'
deprecatedLabel: '**⚠️ Deprecations**'
addSections: '{"documentation":{"prefix":"### 📖 Documentation","labels":["documentation"]},"tests":{"prefix":"### ✅ Testing","labels":["tests"]}}'
issues: false
issuesWoLabels: false
sinceTag: ${{ steps.version.outputs.last_release }}
maxIssues: 100
pullRequests: true
prWoLabels: false
author: false
unreleased: true
compareLink: true
stripGeneratorNotice: true
verbose: true
futureRelease: ${{ steps.version.outputs.release_tag }}
excludeTagsRegex: "CI/.+"
releaseBranch: "main"
stripHeaders: true
base: 'none'

- name: "🚀 Github Release"
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"

- name: 🚀 Github Release
if: steps.version.outputs.release_tag != 'skip'
uses: ncipollo/release-action@v1
with:
body: ${{ steps.generate-last-changelog.outputs.changelog }}
tag: ${{ steps.version.outputs.release_tag }}
token: ${{ secrets.ADMIN_TOKEN }}

- name: ☠ Delete Pre-release
if: steps.version.outputs.release_tag != 'skip'
uses: cb80/delrel@latest
with:
tag: "${{ steps.version.outputs.current_version }}"

- name: 🔨 Merge main back to develop
- name: 🔁 Merge main back to develop
if: steps.version.outputs.release_tag != 'skip'
uses: everlytic/branch-merge@1.1.0
if: steps.version_type.outputs.type != 'skip'
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
source_ref: 'main'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@ website/.docusaurus
# Poetry
########

.poetry/
.poetry/
.python-version
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
# Changelog

## [3.1.0-nightly.3](https://github.com/pypeclub/OpenPype/tree/HEAD)
## [3.1.0](https://github.com/pypeclub/OpenPype/tree/3.1.0) (2021-06-15)

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

#### 🚀 Enhancements
**🚀 Enhancements**

- Log Viewer with OpenPype style [\#1703](https://github.com/pypeclub/OpenPype/pull/1703)
- Scrolling in OpenPype info widget [\#1702](https://github.com/pypeclub/OpenPype/pull/1702)
- OpenPype style in modules [\#1694](https://github.com/pypeclub/OpenPype/pull/1694)
- Sort applications and tools alphabetically in Settings UI [\#1689](https://github.com/pypeclub/OpenPype/pull/1689)
- \#683 - Validate Frame Range in Standalone Publisher [\#1683](https://github.com/pypeclub/OpenPype/pull/1683)
- Hiero: old container versions identify with red color [\#1682](https://github.com/pypeclub/OpenPype/pull/1682)
- Project Manger: Default name column width [\#1669](https://github.com/pypeclub/OpenPype/pull/1669)
- Remove outline in stylesheet [\#1667](https://github.com/pypeclub/OpenPype/pull/1667)
- TVPaint: Creator take layer name as default value for subset variant [\#1663](https://github.com/pypeclub/OpenPype/pull/1663)
- TVPaint custom subset template [\#1662](https://github.com/pypeclub/OpenPype/pull/1662)
- Editorial: conform assets validator [\#1659](https://github.com/pypeclub/OpenPype/pull/1659)
- Feature Slack integration [\#1657](https://github.com/pypeclub/OpenPype/pull/1657)
- Nuke - Publish simplification [\#1653](https://github.com/pypeclub/OpenPype/pull/1653)
- StandalonePublisher: adding exception for adding `delete` tag to repre [\#1650](https://github.com/pypeclub/OpenPype/pull/1650)
- \#1333 - added tooltip hints to Pyblish buttons [\#1649](https://github.com/pypeclub/OpenPype/pull/1649)

#### 🐛 Bug fixes
**🐛 Bug fixes**

- Nuke: broken publishing rendered frames [\#1707](https://github.com/pypeclub/OpenPype/pull/1707)
- Standalone publisher Thumbnail export args [\#1705](https://github.com/pypeclub/OpenPype/pull/1705)
- Bad zip can break OpenPype start [\#1691](https://github.com/pypeclub/OpenPype/pull/1691)
- Hiero: published whole edit mov [\#1687](https://github.com/pypeclub/OpenPype/pull/1687)
- Ftrack subprocess handle of stdout/stderr [\#1675](https://github.com/pypeclub/OpenPype/pull/1675)
- Settings list race condifiton and mutable dict list conversion [\#1671](https://github.com/pypeclub/OpenPype/pull/1671)
- 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)
- Project manager save and queue [\#1645](https://github.com/pypeclub/OpenPype/pull/1645)
- New project anatomy values [\#1644](https://github.com/pypeclub/OpenPype/pull/1644)

**Merged pull requests:**

- update dependencies [\#1697](https://github.com/pypeclub/OpenPype/pull/1697)
- Bump normalize-url from 4.5.0 to 4.5.1 in /website [\#1686](https://github.com/pypeclub/OpenPype/pull/1686)
- Add docstrings to Project manager tool [\#1556](https://github.com/pypeclub/OpenPype/pull/1556)

# Changelog

Expand Down
6 changes: 4 additions & 2 deletions openpype/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,17 @@ def extractenvironments(output_json_path, project, asset, task, app):
@main.command()
@click.argument("paths", nargs=-1)
@click.option("-d", "--debug", is_flag=True, help="Print debug messages")
def publish(debug, paths):
@click.option("-t", "--targets", help="Targets module", default=None,
multiple=True)
def publish(debug, paths, targets):
"""Start CLI publishing.
Publish collects json from paths provided as an argument.
More than one path is allowed.
"""
if debug:
os.environ['OPENPYPE_DEBUG'] = '3'
PypeCommands.publish(list(paths))
PypeCommands.publish(list(paths), targets)


@main.command()
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/hiero/plugins/publish/precollect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def process(self, context):

# process all sellected timeline track items
for track_item in selected_timeline_items:

data = {}
clip_name = track_item.name()
source_clip = track_item.source()
self.log.debug("clip_name: {}".format(clip_name))

# get clips subtracks and anotations
annotations = self.clip_annotations(source_clip)
Expand Down Expand Up @@ -128,7 +128,7 @@ def process(self, context):
"_ instance.data: {}".format(pformat(instance.data)))

if not with_audio:
return
continue

# create audio subset instance
self.create_audio_instance(context, **data)
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/publish/extract_playblast.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def process(self, instance):

# Isolate view is requested by having objects in the set besides a
# camera.
if preset.pop("isolate_view", False) or instance.data.get("isolate"):
if preset.pop("isolate_view", False) and instance.data.get("isolate"):
preset["isolate"] = instance.data["setMembers"]

# Show/Hide image planes on request.
Expand Down
2 changes: 1 addition & 1 deletion openpype/hosts/maya/plugins/publish/extract_thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def process(self, instance):

# Isolate view is requested by having objects in the set besides a
# camera.
if preset.pop("isolate_view", False) or instance.data.get("isolate"):
if preset.pop("isolate_view", False) and instance.data.get("isolate"):
preset["isolate"] = instance.data["setMembers"]

with maintained_time():
Expand Down
5 changes: 3 additions & 2 deletions openpype/hosts/nuke/plugins/publish/precollect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,18 @@ def process(self, context):
if target == "Use existing frames":
# Local rendering
self.log.info("flagged for no render")
families.append(family)
elif target == "Local":
# Local rendering
self.log.info("flagged for local render")
families.append("{}.local".format(family))
family = families_ak.lower()
elif target == "On farm":
# Farm rendering
self.log.info("flagged for farm render")
instance.data["transfer"] = False
families.append("{}.farm".format(family))
family = families_ak.lower()

family = families_ak.lower()

node.begin()
for i in nuke.allNodes():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import tempfile
import subprocess
import pyblish.api
import openpype.api
import openpype.lib
Expand Down Expand Up @@ -77,30 +76,37 @@ def process(self, instance):

ffmpeg_args = self.ffmpeg_args or {}

jpeg_items = []
jpeg_items.append("\"{}\"".format(ffmpeg_path))
# override file if already exists
jpeg_items.append("-y")
jpeg_items = [
"\"{}\"".format(ffmpeg_path),
# override file if already exists
"-y"
]

# add input filters from peresets
jpeg_items.extend(ffmpeg_args.get("input") or [])
# input file
jpeg_items.append("-i {}".format(full_input_path))
jpeg_items.append("-i \"{}\"".format(full_input_path))
# extract only single file
jpeg_items.append("-vframes 1")
jpeg_items.append("-frames:v 1")
# Add black background for transparent images
jpeg_items.append((
"-filter_complex"
" \"color=black,format=rgb24[c]"
";[c][0]scale2ref[c][i]"
";[c][i]overlay=format=auto:shortest=1,setsar=1\""
))

jpeg_items.extend(ffmpeg_args.get("output") or [])

# output file
jpeg_items.append(full_thumbnail_path)
jpeg_items.append("\"{}\"".format(full_thumbnail_path))

subprocess_jpeg = " ".join(jpeg_items)

# run subprocess
self.log.debug("Executing: {}".format(subprocess_jpeg))
subprocess.Popen(
subprocess_jpeg,
stdout=subprocess.PIPE,
shell=True
openpype.api.run_subprocess(
subprocess_jpeg, shell=True, logger=self.log
)

# remove thumbnail key from origin repre
Expand Down
Loading

0 comments on commit 8e0080f

Please sign in to comment.