Open MustafaJafar opened 1 month ago
@moonyuet @BigRoy What do you think guys about this issue ? I thought about exposing the HDA asset type in HDA creator settings, which may/might break something or bring this issue back https://github.com/ynput/ayon-core/issues/534 .
I'm not sure - we may need to discuss this in a call. I still wonder why this is "so complicated" even though we have full control over how we name the HDA inside the file.
As far as I know the filename containing the HDA can have any name, including starting with a number whilst the node it defines internally we can define any name we want as well. I wonder what is currently REALLY restricting that "alphabetic number" thing, etc.
it's the to_hda.createDigitalAsset
call. it didn't like the type_name
that starts with number.
I'm not sure - we may need to discuss this in a call. I still wonder why this is "so complicated" even though we have full control over how we name the HDA inside the file.
As far as I know the filename containing the HDA can have any name, including starting with a number whilst the node it defines internally we can define any name we want as well. I wonder what is currently REALLY restricting that "alphabetic number" thing, etc.
This is really weird bug and it's only happened when you have a scene starting with a number? it could have been their functions itself encounter some decoding issue when dealing with some characters.
This is really weird bug and it's only happened when you have a scene starting with a number?
The problem happens because the project name is put at the beginning of the HDA type name template which causes Houdini to error as the asset type name in this situation will be starting by a number.
What we've done in the past when e.g. defining namespaces for maya using the folder name when a folder name started with digits (which maya doesn't like in node names or namespaces) then we prefixed it with _
. I wonder if that'd be 'ok' here too?
Or does that make usage of the node that much less nice?
Or we just always prefix it with AYON_
hehe. Or hda_
- also doesn't sound too nice.
What we've done in the past when e.g. defining namespaces for maya using the folder name when a folder name started with digits (which maya doesn't like in node names or namespaces) then we prefixed it with
_
. I wonder if that'd be 'ok' here too?
I wonder if we should expose that template name to settings with a note about changing the name may break something ?
Or does that make usage of the node that much less nice? Or we just always prefix it with
AYON_
hehe. Orhda_
- also doesn't sound too nice.
hda_{project_name}{folder_path}_{node_name}
🤔 this could work.
I think some projects may start with ayon
making the asset type name look weird ayon_ayon..._....
When does the user 'access' these names? Where does it see it? what does it influence? The default node name when created? In the tab creation menu?
Also, what if we just start the type name with the node name (but end with the project and folder path?) Or doesn't it allow trailing numbers either?
It doesn't affect the node name at all.
It won't show up to users until they enable viewing asset definition.
where they will be able to see the type name.
I think reversing the template will fix the problem as well.
{node_name}_{project_name}{folder_path}
I think reversing the template will fix the problem as well. {nodename}{project_name}{folder_path}
Maybe that is nicer anyway so that the node name (defining the type's name) is the most visible? :)
Maybe that is nicer anyway so that the node name (defining the type's name) is the most visible? :)
Maybe. also, it is defiantly starts with a alphabetic character.
Maybe confirm with client whether it's "fine" for them as well, and when confirmed - make a PR to swap it around to resolve the issue for now. We can always keep an issue open to investigate other ways to customize it? Or maybe the user can already customize it manually after create?
I'm not sure if artists need to deal with the asset type name
/ operator type name
/internal name
Unlike TDs because they may use it for some automations (I mean Houdinish automations that don't use AYON api to get the data)
I was testing the new HDA operator type name template {node_name}_{project_name}{folder_path}
It fixed the problem with the HDA creation but exposed a bug in the HDA Loader!
I opened a new scene and created an HDA with the same name as existent published HDA product.
AYON recognized it as a new version and worked as expected but when loading that back, I can't switch the HDA product to an older version.
This bug can be replicated when the product name is the same but the operator type differs when publishing from multiple workfiles.
Traceback (most recent call last):
File "E:\Ynput\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 366, in <lambda>
lambda: self._show_version_dialog(item_ids, active_repre_id)
File "E:\Ynput\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 843, in _show_version_dialog
self._update_containers_to_version(
File "E:\Ynput\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 1032, in _update_containers_to_version
self._update_containers(item_ids, versions)
File "E:\Ynput\ayon-core\client\ayon_core\tools\sceneinventory\view.py", line 1007, in _update_containers
update_container(container, item_version)
File "E:\Ynput\ayon-core\client\ayon_core\pipeline\load\utils.py", line 539, in update_container
return Loader().update(container, context)
File "E:\Ynput\ayon-houdini\client\ayon_houdini\plugins\load\load_hda.py", line 72, in update
new = def_paths.index(file_path)
ValueError: '//storage/work/ayon_projects/Robo/Assets/Character/moco/publish/hda/mocopigHead/v002/robo_moco_mocopigHead_v002.hda' is not in list
Is there an existing issue for this?
Current Behavior:
HDA creation fails when project name starts with number. Houdini doesn't names that start with number.
and, we currently use this hardcoded template name
{project_name}{folder_path}_{node_name}
for HDA asset type. Which result in this line in Houdini's loghowever it works fine for projects starts with an alphabetic character. here's an example from my end.
Expected Behavior:
We should find some solution for it.
Version
1.0.0
What platform you are running on?
Windows
Steps To Reproduce:
Are there any labels you wish to add?
Relevant log output:
Additional context:
Sometimes we can't avoid starting project names with numbers.
Internal Ticket Number: AY-6177