Merge remote-tracking branch 'upstream/develop' into extract_burnin_fix_env_pythonhome

This commit is contained in:
Roy Nieterau 2023-04-03 13:35:44 +02:00
commit 0c531ea4ee
5 changed files with 4442 additions and 5409 deletions

View file

@ -5,28 +5,73 @@ on:
types: [opened, assigned] types: [opened, assigned]
pull_request_review: pull_request_review:
types: [submitted] types: [submitted]
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
jobs: jobs:
pr_review_requested:
name: pr_review_requested pr_review_started:
name: pr_review_started
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested' # -----------------------------
# conditions are:
# - PR issue comment which is not form Ynbot
# - PR review comment which is not Hound (or any other bot)
# - PR review submitted which is not from Hound (or any other bot) and is not 'Changes requested'
# -----------------------------
if: |
(github.event_name == 'issue_comment' && github.event.comment.user.id != 82967070) ||
(github.event_name == 'pull_request_review_comment' && github.event.comment.user.type != 'Bot') ||
(github.event_name == 'pull_request_review' && github.event.review.state != 'changes_requested' && github.event.review.user.type != 'Bot')
steps: steps:
- name: Move PR to 'Change Requested' - name: Move PR to 'Review In Progress'
uses: leonsteinhaeuser/project-beta-automations@v2.1.0 uses: leonsteinhaeuser/project-beta-automations@v2.1.0
with: with:
gh_token: ${{ secrets.YNPUT_BOT_TOKEN }} gh_token: ${{ secrets.YNPUT_BOT_TOKEN }}
organization: ynput organization: ynput
project_id: 11 project_id: 11
resource_node_id: ${{ github.event.pull_request.node_id }} resource_node_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }}
status_value: Change Requested status_value: Review In Progress
pr_review_requested:
# -----------------------------
# Resets Clickup Task status to 'In Progress' after 'Changes Requested' were submitted to PR
# It only runs if custom clickup task id was found in ref branch of PR
# -----------------------------
name: pr_review_requested
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested'
steps:
- name: Set branch env
run: echo "BRANCH_NAME=${{ github.event.pull_request.head.ref}}" >> $GITHUB_ENV
- name: Get ClickUp ID from ref head name
id: get_cuID
run: |
echo ${{ env.BRANCH_NAME }}
echo "cuID=$(echo $BRANCH_NAME | sed 's/.*\/\(OP\-[0-9]\{4\}\).*/\1/')" >> $GITHUB_OUTPUT
- name: Print ClickUp ID
run: echo ${{ steps.get_cuID.outputs.cuID }}
- name: Move found Clickup task to 'Review in Progress'
if: steps.get_cuID.outputs.cuID
run: |
curl -i -X PUT \
'https://api.clickup.com/api/v2/task/${{ steps.get_cuID.outputs.cuID }}?custom_task_ids=true&team_id=${{secrets.CLICKUP_TEAM_ID}}' \
-H 'Authorization: ${{secrets.CLICKUP_API_KEY}}' \
-H 'Content-Type: application/json' \
-d '{
"status": "in progress"
}'
size-label: size-label:
name: pr_size_label name: pr_size_label
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: | if: |
${{(github.event_name == 'pull_request' && github.event.action == 'assigned') (github.event_name == 'pull_request' && github.event.action == 'assigned') ||
|| (github.event_name == 'pull_request' && github.event.action == 'opened')}} (github.event_name == 'pull_request' && github.event.action == 'opened')
steps: steps:
- name: Add size label - name: Add size label
@ -49,8 +94,8 @@ jobs:
name: pr_branch_label name: pr_branch_label
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: | if: |
${{(github.event_name == 'pull_request' && github.event.action == 'assigned') (github.event_name == 'pull_request' && github.event.action == 'assigned') ||
|| (github.event_name == 'pull_request' && github.event.action == 'opened')}} (github.event_name == 'pull_request' && github.event.action == 'opened')
steps: steps:
- name: Label PRs - Branch name detection - name: Label PRs - Branch name detection
uses: ffittschen/pr-branch-labeler@v1 uses: ffittschen/pr-branch-labeler@v1
@ -61,8 +106,8 @@ jobs:
name: pr_globe_label name: pr_globe_label
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: | if: |
${{(github.event_name == 'pull_request' && github.event.action == 'assigned') (github.event_name == 'pull_request' && github.event.action == 'assigned') ||
|| (github.event_name == 'pull_request' && github.event.action == 'opened')}} (github.event_name == 'pull_request' && github.event.action == 'opened')
steps: steps:
- name: Label PRs - Globe detection - name: Label PRs - Globe detection
uses: actions/labeler@v4.0.3 uses: actions/labeler@v4.0.3

View file

@ -329,6 +329,7 @@ def write_project_to_op(project: dict, dbcon: AvalonMongoDB) -> UpdateOne:
"code": project_code, "code": project_code,
"fps": float(project["fps"]), "fps": float(project["fps"]),
"zou_id": project["id"], "zou_id": project["id"],
"active": project['project_status_name'] != "Closed",
} }
) )
@ -379,7 +380,7 @@ def sync_all_projects(
# Iterate projects # Iterate projects
dbcon = AvalonMongoDB() dbcon = AvalonMongoDB()
dbcon.install() dbcon.install()
all_projects = gazu.project.all_open_projects() all_projects = gazu.project.all_projects()
for project in all_projects: for project in all_projects:
if ignore_projects and project["name"] in ignore_projects: if ignore_projects and project["name"] in ignore_projects:
continue continue
@ -404,7 +405,21 @@ def sync_project_from_kitsu(dbcon: AvalonMongoDB, project: dict):
if not project: if not project:
project = gazu.project.get_project_by_name(project["name"]) project = gazu.project.get_project_by_name(project["name"])
log.info("Synchronizing {}...".format(project["name"])) # Get all statuses for projects from Kitsu
all_status = gazu.project.all_project_status()
for status in all_status:
if project['project_status_id'] == status['id']:
project['project_status_name'] = status['name']
break
# Do not sync closed kitsu project that is not found in openpype
if (
project['project_status_name'] == "Closed"
and not get_project(project['name'])
):
return
log.info(f"Synchronizing {project['name']}...")
# Get all assets from zou # Get all assets from zou
all_assets = gazu.asset.all_assets_for_project(project) all_assets = gazu.asset.all_assets_for_project(project)
@ -429,6 +444,9 @@ def sync_project_from_kitsu(dbcon: AvalonMongoDB, project: dict):
log.info("Project created: {}".format(project_name)) log.info("Project created: {}".format(project_name))
bulk_writes.append(write_project_to_op(project, dbcon)) bulk_writes.append(write_project_to_op(project, dbcon))
if project['project_status_name'] == "Closed":
return
# Try to find project document # Try to find project document
if not project_dict: if not project_dict:
project_dict = get_project(project_name) project_dict = get_project(project_name)

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Package declaring Pype version.""" """Package declaring Pype version."""
__version__ = "3.15.4-nightly.1" __version__ = "3.15.4-nightly.2"

View file

@ -194,6 +194,74 @@ A profile may generate multiple outputs from a single input. Each output must de
- Nuke extractor settings path: `project_settings/nuke/publish/ExtractReviewDataMov/outputs/baking/add_custom_tags` - Nuke extractor settings path: `project_settings/nuke/publish/ExtractReviewDataMov/outputs/baking/add_custom_tags`
- Filtering by input length. Input may be video, sequence or single image. It is possible that `.mp4` should be created only when input is video or sequence and to create review `.png` when input is single frame. In some cases the output should be created even if it's single frame or multi frame input. - Filtering by input length. Input may be video, sequence or single image. It is possible that `.mp4` should be created only when input is video or sequence and to create review `.png` when input is single frame. In some cases the output should be created even if it's single frame or multi frame input.
### Extract Burnin
Plugin is responsible for adding burnins into review representations.
Burnins are text values painted on top of input and may be surrounded with box in 6 available positions `Top Left`, `Top Center`, `Top Right`, `Bottom Left`, `Bottom Center`, `Bottom Right`.
![presets_plugins_extract_burnin](../assets/presets_plugins_extract_burnin_01.png)
The Extract Burnin plugin creates new representations based on plugin presets, representations in instance and whether the reviewable matches the profile filter.
A burnin can also be directly linked by name in the output definitions of the [Extract Review plug-in settings](#extract-review) so _can_ be triggered without a matching profile.
#### Burnin formatting options (`options`)
The formatting options define the font style for the burnin texts.
The X and Y offset define the margin around texts and (background) boxes.
#### Burnin profiles (`profiles`)
Plugin process is skipped if `profiles` are not set at all. Profiles contain list of profile items. Each burnin profile may specify filters for **hosts**, **tasks** and **families**. Filters work the same way as described in [Profile Filters](#profile-filters).
#### Profile burnins
A burnin profile may set multiple burnin outputs from one input. The burnin's name represents the unique **filename suffix** to avoid overriding files with same name.
| Key | Description | Type | Example |
| --- | --- | --- | --- |
| **Top Left** | Top left corner content. | str | "{dd}.{mm}.{yyyy}" |
| **Top Centered** | Top center content. | str | "v{version:0>3}" |
| **Top Right** | Top right corner content. | str | "Static text" |
| **Bottom Left** | Bottom left corner content. | str | "{asset}" |
| **Bottom Centered** | Bottom center content. | str | "{username}" |
| **Bottom Right** | Bottom right corner content. | str | "{frame_start}-{current_frame}-{frame_end}" |
Each burnin profile can be configured with additional family filtering and can
add additional tags to the burnin representation, these can be configured under
the profile's **Additional filtering** section.
:::note Filename suffix
The filename suffix is appended to filename of the source representation. For
example, if the source representation has suffix **"h264"** and the burnin
suffix is **"client"** then the final suffix is **"h264_client"**.
:::
**Available keys in burnin content**
- It is possible to use same keys as in [Anatomy](admin_settings_project_anatomy.md#available-template-keys).
- It is allowed to use Anatomy templates themselves in burnins if they can be filled with available data.
- Additional keys in burnins:
| Burnin key | Description |
| --- | --- |
| frame_start | First frame number. |
| frame_end | Last frame number. |
| current_frame | Frame number for each frame. |
| duration | Count number of frames. |
| resolution_width | Resolution width. |
| resolution_height | Resolution height. |
| fps | Fps of an output. |
| timecode | Timecode by frame start and fps. |
| focalLength | **Only available in Maya**<br /><br />Camera focal length per frame. Use syntax `{focalLength:.2f}` for decimal truncating. Eg. `35.234985` with `{focalLength:.2f}` would produce `35.23`, whereas `{focalLength:.0f}` would produce `35`. |
:::warning
`timecode` is a specific key that can be **only at the end of content**. (`"BOTTOM_RIGHT": "TC: {timecode}"`)
:::
### IntegrateAssetNew ### IntegrateAssetNew
Saves information for all published subsets into DB, published assets are available for other hosts, tools and tasks after. Saves information for all published subsets into DB, published assets are available for other hosts, tools and tasks after.

File diff suppressed because it is too large Load diff