From 007b2a6853707e6659fd9ce4e2685a34bec1e1e4 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 3 Apr 2023 12:04:34 +0200 Subject: [PATCH 1/2] Documentation: Add Extract Burnin documentation (#4765) * Add Extract Burnin documentation * Add links / fix links * Simplify documentation * Remove mention of houdini --- .../settings_project_global.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/website/docs/project_settings/settings_project_global.md b/website/docs/project_settings/settings_project_global.md index 821585ae21..2de9038f3f 100644 --- a/website/docs/project_settings/settings_project_global.md +++ b/website/docs/project_settings/settings_project_global.md @@ -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` - 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**

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 Saves information for all published subsets into DB, published assets are available for other hosts, tools and tasks after. From 34528b6eeb26c6d463b3e9a7b0afbd3937866d99 Mon Sep 17 00:00:00 2001 From: Thomas Fricard <51854004+friquette@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:11:53 +0200 Subject: [PATCH 2/2] Deactivate closed Kitsu projects on OP (#4619) * update openpype projects status from kitsu settings * fix linting errors * get all projects and verify the project status for each project * optimizing project status name verification * sync only if project exists and is active in OP * remove noqa Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> * break from all_status for loop and add comment for non sync projects --------- Co-authored-by: jeremy.oblet Co-authored-by: Thomas Fricard Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- .../modules/kitsu/utils/update_op_with_zou.py | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/openpype/modules/kitsu/utils/update_op_with_zou.py b/openpype/modules/kitsu/utils/update_op_with_zou.py index 1f38648dfa..4f4f0810bc 100644 --- a/openpype/modules/kitsu/utils/update_op_with_zou.py +++ b/openpype/modules/kitsu/utils/update_op_with_zou.py @@ -329,6 +329,7 @@ def write_project_to_op(project: dict, dbcon: AvalonMongoDB) -> UpdateOne: "code": project_code, "fps": float(project["fps"]), "zou_id": project["id"], + "active": project['project_status_name'] != "Closed", } ) @@ -379,7 +380,7 @@ def sync_all_projects( # Iterate projects dbcon = AvalonMongoDB() dbcon.install() - all_projects = gazu.project.all_open_projects() + all_projects = gazu.project.all_projects() for project in all_projects: if ignore_projects and project["name"] in ignore_projects: continue @@ -404,7 +405,21 @@ def sync_project_from_kitsu(dbcon: AvalonMongoDB, project: dict): if not project: 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 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)) bulk_writes.append(write_project_to_op(project, dbcon)) + if project['project_status_name'] == "Closed": + return + # Try to find project document if not project_dict: project_dict = get_project(project_name)