Skip to content

new: add host as a key in get_product_name - #2001

Open
vincentullmann wants to merge 3 commits into
ynput:developfrom
vincentullmann:add_host_to_get_product_name
Open

new: add host as a key in get_product_name#2001
vincentullmann wants to merge 3 commits into
ynput:developfrom
vincentullmann:add_host_to_get_product_name

Conversation

@vincentullmann

Copy link
Copy Markdown
Contributor

Changelog Description

added {host} as a key to be available in get_product_name

Additional info

It felt strange beeing able to filter profiles by host, but then to not be able to have host as an option in the template itself.
In our case it lead to the creation of multiple profiles for each host:

[
    {
      "product_base_types": ["workfile"],
      "host_names": ["nuke"],
      "template": "{product[type]}{Task[name]}Nuke"
    },
    {
      "product_base_types": ["workfile"],
      "host_names": ["houdini"],
      "template": "{product[type]}{Task[name]}Houdini"
    },
    {
      "product_base_types": ["workfile"],
      "host_names": ["maya"],
      "template": "{product[type]}{Task[name]}Maya"
    },
    {
      "product_base_types": ["workfile"],
      "host_names": ["substancepainter"],
      "template": "{product[type]}{Task[name]}SubstancePainter"
    },
    {
      "product_base_types": ["workfile"],
      "host_names": ["zbrush"],
      "template": "{product[type]}{Task[name]}ZBrush"
    }
  ]

With this change this can be consolidated into a single profile:

[
    {
      "product_base_types": ["workfile"],
      "host_names": [],
      "template": "{product[type]}{Task[name]}{Host[name]}"
    }
]

str vs. dict

I wasn't 100% sure weather use the string {host} or dict {host[name]} variant

I'e went with the dict version as it feels more in line with how the product and task entities are represented and keeps the door open for other attributes in the future. ({host[label]} or similar in the future for SubstancePainter or ZBrush)

{host} is nice and short and does the job perfectly well right now, but i'm worried we end up having to implement a similar check as the {task} -> {task[name]} conversion to migrate templates if we ever decide to change it

Testing notes:

  1. add {host[name]} or {Host[name]} to a product name template
  2. confirm in the creator or any other tool that the host name is added

@ynbot ynbot added the size/XS label Aug 14, 2026
@vincentullmann
vincentullmann force-pushed the add_host_to_get_product_name branch from 7c91ddd to 6a8fdb6 Compare August 14, 2026 13:41
@iLLiCiTiT

Copy link
Copy Markdown
Member

@moonyuet or @LiborBatek could you try it out? I think it should work.

@BigRoy
BigRoy requested review from LiborBatek and moonyuet August 14, 2026 15:50

@moonyuet moonyuet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It shows the host name as expected

Image

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have tested it while using it for the workfile product and in blender host app and all been working correctly. I have also inspected the resulting products and whether they are correctly integrated and all seem to be working...

LGTM

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants