Skip to content
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

Set loader name on "Load sequence" #18

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

Sponge96
Copy link
Contributor

@Sponge96 Sponge96 commented Oct 3, 2024

Changelog Description

Simple change to use the existing name argument to set the loaders name attribute.

Additional info

Before:
image
image

After:
image
image

Testing notes:

  1. load sequence from AYON Loader
  2. check the new created node name reflects the selected sequence from AYON Loader

@BigRoy
Copy link
Contributor

BigRoy commented Oct 3, 2024

Yes, nice - We happened to have something on our own studio as well - but slightly more specific:

def _set_name(self, tool, context):
# NOTE: Colorbleed-specific edit
# Name tool to subset without the product type prefix
# 'renderLightingMain' becomes `LightingMain`
product_entity = context["product"]
label: str = product_entity["name"]
product_type: str = product_entity["productType"]
label = label.removeprefix(product_type)
tool.SetAttrs({
"TOOLS_Name": label,
"TOOLB_NameSet": True
})

So I guess this is good.

@BigRoy BigRoy self-requested a review October 3, 2024 14:01
@BigRoy BigRoy self-assigned this Oct 3, 2024
@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Oct 3, 2024
Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Works for me.

image

@BigRoy BigRoy changed the title name loader on load_sequence Set loader name on "Load sequence" Oct 3, 2024
@BigRoy BigRoy merged commit 29963a1 into ynput:develop Oct 3, 2024
1 check passed
@Sponge96 Sponge96 deleted the load_sequence-add-loader-naming branch October 3, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants