Hello,
Is there a way to have the default state name update with the HDA version? When the HDA is versioned up currently there will always be an error about the viewer state name conflict if the user has forgotten to rename it and the old HDA is still in the hip file. As you can imagine this can and is causing havoc when these HDAs are pushed to hundreds of Houdini users.
Thanks
Automatically version up HDA default State
1082 4 2-
- JohnDoe777
- Member
- 46 posts
- Joined: Dec. 2014
- Offline
-
- vikus
- Member
- 247 posts
- Joined: May 2017
- Offline
Hi, under $HHP (python libs) there is a module 'assettools.py' which contains all related functions for assets creation through the node context menu, including increasing of version. A lot of stuff... To set the default state name you can use this:
OPMenu.xml [www.sidefx.com] uses the 'increaseMajorVersion' function, which you can find at bottom in the assetstools module. I guess the line above and some extra string logic should make it work.
node.type().definition().sections()["DefaultState"].setContents('new_state_name')
-
- JohnDoe777
- Member
- 46 posts
- Joined: Dec. 2014
- Offline
Hi thanks for your reply,
I should have said that in this situation they're not using the default Side Effects versioning up but an in house publishing script. I'm sure pipeline could implement an easy fix to change the default state name version when versioning up. Problem is they're not bothered with fixing any critical problems with their HDA publishing system.
So as a user I was hoping that there was a way to put the current HDA version in the default state name like a variable "viewer_state_tool_$VERSION" so when I published the HDA it's already correctly versioned.
If that's not possible I'll probably try and do a wrapper script around the HDA publisher that the studio uses to set the default state name myself.
I should have said that in this situation they're not using the default Side Effects versioning up but an in house publishing script. I'm sure pipeline could implement an easy fix to change the default state name version when versioning up. Problem is they're not bothered with fixing any critical problems with their HDA publishing system.
So as a user I was hoping that there was a way to put the current HDA version in the default state name like a variable "viewer_state_tool_$VERSION" so when I published the HDA it's already correctly versioned.
If that's not possible I'll probably try and do a wrapper script around the HDA publisher that the studio uses to set the default state name myself.
-
- JohnDoe777
- Member
- 46 posts
- Joined: Dec. 2014
- Offline
-
- vikus
- Member
- 247 posts
- Joined: May 2017
- Offline
-
- Quick Links

