generated from ynput/ayon-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing multiple :
split issue and others small issues
#30
Merged
tatiana-ynput
merged 23 commits into
develop
from
bugfix/AY-6259_14_flame-vertical-alignment-not-identifying-hierotracks
Nov 15, 2024
Merged
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4bebdb5
Add debug log for split comments in CollectTimelineInstances.
jakubjezek001 702f80a
Refactor segment attribute retrieval and track name handling,
jakubjezek001 99a0194
Update segment attributes retrieval to use direct attribute access.
jakubjezek001 4cfd58a
reverting changes
jakubjezek001 674d3dc
Update logger instantiation and usage in CreateShotClip class
jakubjezek001 43e5d06
Add debug logging for used names list in PublishableClip and set log …
jakubjezek001 9a5284a
Refactor widget creation method and update logger initialization.
jakubjezek001 5bc056a
Update debug logs for clip product name and used names list in Publis…
jakubjezek001 65dd64d
Refactor debug log statements in PublishableClip class
jakubjezek001 16d968e
Update debug logs for clip and product names in PublishableClip.
jakubjezek001 6e0abe5
Refactor clip product name handling logic
jakubjezek001 08bcb06
Refactor regex patterns and handle attribute values more efficiently.
jakubjezek001 b4be87b
Refactor method call in CollectTimelineInstances plugin
jakubjezek001 b21b439
Update client/ayon_flame/plugins/publish/collect_timeline_instances.py
jakubjezek001 269e185
Update client/ayon_flame/api/plugin.py
jakubjezek001 6f14faa
Refactor clip matching logic for vertical sync
jakubjezek001 00a1e8e
typo fix
jakubjezek001 984f079
Refactor code for handling duplicate product names.
jakubjezek001 f56e5ef
Refactor clip product name handling logic
jakubjezek001 6c060de
Refactor clip uniqueness check logic and key formation.
jakubjezek001 275fed8
Merge branch 'develop' into bugfix/AY-6259_14_flame-vertical-alignmen…
jakubjezek001 638d0ae
Remove unused Logger import and update log reference to self.log for …
jakubjezek001 7754b2a
Update attributes to use integer or float values where necessary.
jakubjezek001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
from pprint import pformat | ||
|
||
# constatns | ||
NUM_PATERN = re.compile(r"([0-9\.]+)") | ||
TXT_PATERN = re.compile(r"([a-zA-Z]+)") | ||
NUM_PATTERN = re.compile(r"([0-9\.]+)") | ||
TXT_PATTERN = re.compile(r"([a-zA-Z]+)") | ||
|
||
|
||
class CollectTimelineInstances(pyblish.api.ContextPlugin): | ||
|
@@ -209,13 +209,18 @@ def _get_comment_attributes(self, segment): | |
"pixelRatio": 1.00} | ||
} | ||
# search for `:` | ||
# INFO: clip based overrides needs to have specific format | ||
# `key: value` separated `,` or `;`. This is for cases where we | ||
# need to override resolution, aspect ratio, etc. per clip. | ||
for split in self._split_comments(comment): | ||
self.log.debug(f"__ split: {split}") | ||
|
||
# make sure we ignore if not `:` in key | ||
if ":" not in split: | ||
# of if there is more than one `:` in key | ||
if split.count(":") != 1: | ||
continue | ||
|
||
self._get_xml_preset_attrs( | ||
attributes, split) | ||
self._get_xml_preset_attrs(attributes, split) | ||
|
||
# add xml overrides resolution to instance data | ||
xml_overrides = attributes["xml_overrides"] | ||
|
@@ -242,36 +247,36 @@ def _get_xml_preset_attrs(self, attributes, split): | |
continue | ||
|
||
# get pattern defined by type | ||
pattern = TXT_PATERN | ||
pattern = TXT_PATTERN | ||
if a_type in ("number", "float"): | ||
pattern = NUM_PATERN | ||
pattern = NUM_PATTERN | ||
|
||
res_goup = pattern.findall(value) | ||
res_group = pattern.findall(value) | ||
|
||
# raise if nothing is found as it is not correctly defined | ||
if not res_goup: | ||
if not res_group: | ||
raise ValueError(( | ||
"Value for `{}` attribute is not " | ||
"set correctly: `{}`").format(a_name, split)) | ||
|
||
if "string" in a_type: | ||
_value = res_goup[0] | ||
_value = res_group[0] | ||
if "float" in a_type: | ||
_value = float(res_goup[0]) | ||
_value = float(res_group[0]) | ||
if "number" in a_type: | ||
_value = int(res_goup[0]) | ||
_value = int(res_group[0]) | ||
|
||
attributes["xml_overrides"][a_name] = _value | ||
|
||
# condition for resolution in key | ||
if "resolution" in key.lower(): | ||
res_goup = NUM_PATERN.findall(value) | ||
# check if axpect was also defined | ||
res_group = NUM_PATTERN.findall(value) | ||
# check if aspect was also defined | ||
# 1920x1080x1.5 | ||
aspect = res_goup[2] if len(res_goup) > 2 else 1 | ||
aspect = res_group[2] if len(res_group) > 2 else 1 | ||
|
||
width = int(res_goup[0]) | ||
height = int(res_goup[1]) | ||
width = int(res_group[0]) | ||
height = int(res_group[1]) | ||
pixel_ratio = float(aspect) | ||
attributes["xml_overrides"].update({ | ||
"width": width, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these changes are related to typo fixing. |
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these changes are related to typo fixing.