Skip to content

Feature: Override template backdrop container name#95

Merged
kalisp merged 11 commits into
ynput:developfrom
Tilix4:feature/container_name_override
Feb 10, 2026
Merged

Feature: Override template backdrop container name#95
kalisp merged 11 commits into
ynput:developfrom
Tilix4:feature/container_name_override

Conversation

@Tilix4
Copy link
Copy Markdown
Contributor

@Tilix4 Tilix4 commented Dec 23, 2025

Changelog Description

Add override name support for Harmony template loading (backdrop containers)

Additional review information

This allows more flexibility over how data are published and loaded. Also allows to add {folder[name} in container name while it is not handled in core side ynput/ayon-core#1213

Testing notes:

  • configure TemplateLoader setting override_name to a bracketed template (e.g. {folder[name]}_{product[name]})
  • load a tpl representation and verify the loaded backdrop is renamed accordingly
  • load without override set; ensure default naming still works and no errors occur when no backdrops are initially selected

@kalisp kalisp self-requested a review January 7, 2026 11:07
count = backdropCounts[backdropName] !== undefined ? backdropCounts[backdropName] : 1;

if (count > 1){
if (!hasOverrideName && count > 1){
Copy link
Copy Markdown
Member

@kalisp kalisp Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right, this will result in duplicate names if overrideName and same template will be loaded.

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I don't know why I over thought this. Fixed

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Jan 9, 2026

This will also break logic:

        var backdropName = allBackdrops[i].title.text;
        var splitted = splitByLastDelimiter(backdropName, '_');
        var count = splitted[1] !== undefined ? splitted[1] : 1;
        backdropName = splitted[0];

where it was assumed, that there won't be any other '_' delimiter but possibly at the end denoting unique ordinal number of backdrop. (Same template loaded multiple times should have different name 'harmony.templeteMain_1, harmony.template_2`.

@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Jan 30, 2026

This will also break logic:

Fixed weeks ago.

@BigRoy BigRoy requested a review from kalisp January 30, 2026 11:57
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels Jan 30, 2026
@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Feb 3, 2026

Hi @kalisp I'm facing something strange: the incremental naming feature you asked me to preserve in this PR is no longer working (has it even worked?). Is it working on your side in the develop branch? Because it doesn't on mine and I cannot remember it did for sure...

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 4, 2026

the incremental naming feature you asked me to preserve in this PR is no longer working (has it even worked?).

It seems to be working for me in develop for me (see harmony.templateMain_3, harmony.templateMain_4)
image

(Not completely sure where the color of main backdrop wrapper go, but naming changes.)

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 4, 2026

In this PR is somehow understood, that there are already 2 templateMain, but then it kept using same name for all additional loads.

image

(And I thinks it should had be sq01_harmony.templateMain (without 3) as that name would be unique when first loaded as harmony.templateMain vs sq01_harmony.templateMain)

(Override container name used {folder[name]}_{product[name]})

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 4, 2026

And later change to template didnt propagate. It kept using sq01_harmony.templateMain.

image

@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Feb 5, 2026

And later change to template didnt propagate. It kept using sq01_harmony.templateMain.

Did you restart your harmony?

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 5, 2026

Did you restart your harmony?

Fck, damn project overrides, skillz issue :/.

But there is still some issue. According to log (left column) it thinks there should be new_sq01_harmony.templateMain used (which is expected), but it still names it harmony.templateMain)
image

Next two same loads use correct value for the first time, but will not increment for second time.
image

(Double checked everything if it is not problem between chair and keybord, won't be first time, wont be last :/)

@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Feb 5, 2026

It seems to be working for me in develop for me (see harmony.templateMain_3, harmony.templateMain_4)

I'm really sorry but I cannot make it work 😭 Could list the steps you're following?
On my side I'm basically loading twice in a row the exact same product. Is that what you're doing too? Or do you have any other step?

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 5, 2026

image image image image image

@kalisp
Copy link
Copy Markdown
Member

kalisp commented Feb 5, 2026

Hm, multiple render names are bit wonky (as I would expect _0 resp _1 at the end), but Manage still differentiate between two nodes/instances, which is more important.

image

@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Feb 5, 2026

I found the issue, I proposed a fix there #105. Will update the current PR when the fix will be merged because working code relies on it.

@Tilix4
Copy link
Copy Markdown
Contributor Author

Tilix4 commented Feb 9, 2026

@kalisp ready to be tested

Copy link
Copy Markdown
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it works fine.

Thanks for contribution.

@kalisp kalisp merged commit 2c6d847 into ynput:develop Feb 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants