Houdini tip | Save modified asset as new version

I would like to share a small convenience tool for upversioning modified (unlocked) assets.

Tool in right-click menu of an unlocked asset

AFAIK the default workflow of creating new version of assets is to duplicate the asset first with a new version in its name and then do the changes.

This workflow however might be a bit counter-productive as people often do many experimental changes first and just then see if they will make it into newer version or not.

I used this workflow for some time until a friend at the university pointed it out that it of course does not make a sense and that it should be the other way around – do modification first and if satisfied, save as a new version.

This sparked my interest and as it turns out the tool to do exactly this thing can be easily and seamlessly added into Houdini with use of couple of Houdini HOM methods.

This post is quite related to a post I wrote about asset versioning workflow, you can check it if interested in more info about this topic.




To use the tool simply right-click on a unlocked asset and click on Save as New Version menu item.

After that enter the new name. You can use namespacing with :: and modify version number.

Entering new version number: 9.8

After confirming the tool is done. Your node will update to the new version which was just created with your changes. You can see the new version in version menu.

The latest version which was just created

If you do not see Asset Name and Path menu, then enable it in Asset Manager.

Enable Asset Bar for easy version selection



To install this tool, simply create OPmenu.xml file somewhere with the following contents.

<?xml version="1.0" encoding="UTF-8"?>
<scriptItem id="opmenu.save_as_new_version">
<label>Save as New Version</label>
node = kwargs["node"]
if node.matchesCurrentDefinition():
return False
if not node.isNetwork():
return False
hda_def = node.type().definition()
if not hda_def:
return False
options = hda_def.options()
if not options.lockContents():
return False
if node.isInsideLockedHDA() and not node.isEditableInsideLockedHDA():
return False
if hou.hda.safeguardHDAs():
return False
if not node.type().isWritable():
return False
if not node.type().areContentsViewable():
return False
return True
# unlocked node
unlocked_node = kwargs["node"]
unlocked_def = unlocked_node.type().definition()
current_name = unlocked_node.type().name()
# disk path of asset
asset_path = unlocked_def.libraryFilePath()
# get new name and save a new version
choice, new_name = hou.ui.readInput(message="Please enter new node name", title="New name", buttons=("OK", "Cancel"), close_choice=1, initial_contents=current_name)
if choice == 0:
node_type_category = unlocked_node.type().category()
unlocked_def.copyToHDAFile(asset_path, new_name=new_name)
# get definition of new version and update from unlocked node
new_type = hou.nodeType(node_type_category, new_name)
new_def = new_type.definition()
# change unlocked node to the new definition and match current definition
unlocked_node = unlocked_node.changeNodeType(new_name)

view raw
hosted with ❤ by GitHub

After that set directory location where this file is created in HOUDINI_MENU_PATH environment variable.

For example by adding this into your houdini.env file:

HOUDINI_MENU_PATH = /home/user/save_as_new_version_folder;&


That should be all 🙂 Happy versioning.

Houdini tip | Save modified asset as new version