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

Houdini: Fix CreateHDA for Houdini 20+ #698

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Jun 25, 2024

Changelog Description

Fix CreateHDA import, refactor setToolSubmenu -> setTabSubMenu for recent Houdini versions

Additional info

Fixes #697

Testing notes:

  1. No errors should show upon startup of Houdini, in both Houdini 19 and 20
  2. Create HDA and publishing should work in Houdini 19 and 20

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

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

image

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

So, it works without issues but I noticed something weird.
HDAs published from Houdini 20.0 don't keep their submenu.
In my screenshot. the HDA includes uppercase S was published from Houdini 19.5.
image

Here's a demo.

import hou
from assettools import setTabSubMenu

hda_node = hou.node('/obj/mocoOsphere')
hda_def = hda_node.type().definition()
setTabSubMenu(hda_def, "AYON/{}".format("Robo"))  
2024-06-25.15-49-55.mp4

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jun 25, 2024

HDAs published from Houdini 20.0 don't keep their submenu.
In my screenshot. the HDA includes uppercase S was published from Houdini 19.5.

Could you show what it looks like when published from Houdini 20?
Also, do you need me to debug why this is happening and fix it? or are you looking into it?

@MustafaJafar
Copy link
Contributor

Yeah, they are not the same.
Also, I wonder who are Attila and Jeff
image

@MustafaJafar
Copy link
Contributor

Could you show what it looks like when published from Houdini 20?
Also, do you need me to debug why this is happening and fix it? or are you looking into it?

I update my comment above and added a quick screen record.
Currently, I'm comparing the two functions.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Jun 25, 2024

Also, I wonder who are Attila and Jeff

Very likely:

@MustafaJafar
Copy link
Contributor

Also, I wonder who are Attila and Jeff

Very likely:

😮😮😮

@MustafaJafar
Copy link
Contributor

@fabiaserra could you let us know what do you think about setting HDA's submenu location ?
I found this some time ago Setting HDA tab submenu name via python? which is similar to assettools.setToolSubmenu logic in Houdini 19.5.

For context,
assettools.setToolSubmenu in Hou 19.5 was refactored to assettools.setTabSubMenu in Hou 20.0
assettools.setToolSubmenu sets the sub menu location permanently
while assettools.setTabSubMenu sets the sub menu interactively (which requires the user to click apply in the HDA type properties window)

For reference,
I used to use the same logic as assettools.setTabSubMenu but I replaced it with assettools.setToolSubmenu.
17ec19f

@fabiaserra
Copy link
Contributor

@fabiaserra could you let us know what do you think about setting HDA's submenu location ?

I'm not sure what do you want me to check?

@BigRoy BigRoy marked this pull request as ready for review July 2, 2024 01:43
Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

wow, it works!

workfile loaded in another file
image image
image image

@antirotor antirotor merged commit 3528bc3 into ynput:develop Jul 2, 2024
3 checks passed
@BigRoy
Copy link
Collaborator Author

BigRoy commented Jul 2, 2024

Thanks for merging - be aware that this PR did not have a version bump which it should have. If we merge the USD one now quickly we should be fine - then it'd just contain both in one version bump.

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.

Houdini: Cannot import name 'setToolSubmenu' from 'assettools'
6 participants