On this page |
Overview ¶
Normally, scene (.hip
) files and asset libraries are stored as single binary files. This is the most efficient form, but it makes a few things difficult:
-
Can’t use text diffing tools to compare files.
-
Can only check assets into source controls as monolithic binary blobs.
-
Can only manipulate assets using Python scripting in Houdini.
For scenarios where you need these abilities, you can save a scene file as plain text, and convert an asset between plain text and binary.
Converting ¶
To... | Do this |
---|---|
Save a HIP file as plain text |
Choose File ▸ Save as text. Once a file is saved as text, future saves will also be as text, and Save as text becomes Save as binary. |
Convert an asset library to unpacked plain text format |
Houdini replaces the single binary file with a directory of the same name, containing files with various information about the asset(s) in the library. |
Convert an unpacked plain text asset library to a single binary file |
|
Convert asset libraries on the command line |
To convert an hotl -t unpacked_dir_name source_hda_file To convert a directory back to single file: hotl -l source_unpacked_dir_name hda_file If you are merging HDAs using |
Comparing assets in Houdini ¶
You can run an external diff tool from within Houdini.
Diffs results for scene files and assets may not be very clear or understandable, but hopefully can give a sense of what’s changed.
To... | Do this |
---|---|
Set up your diffing program |
In the main menus, choose Edit ▸ Preferences ▸ External tools. Set up the “File compare” and “Folder compare” sections with information about your preferred diff program:
|
See what you've changed in an unlocked asset |
Right-click the asset and choose Show changes. |
See what you've changed in the current scene file |
In the main menu, choose File ▸ Show changes. |
Compare an asset to a backup version |
Houdini automatically saves backups when you modify assets. You can see what’s changed in the asset definition since a previous backup.
|
Compare two assets |
|
Tips and notes ¶
-
Changes to the asset library in Houdini (for example, adding a section in the Extra files tab of an asset) will still update the contents of an expanded asset library.
-
Currently, the files contained and file formats used inside an asset library directory are undocumented and subject to change without notice. Some of it is fairly straightforward, but just remember that if you try to develop scripts that modify assets by editing the expanded files directly, those scripts could possibly break in a future version of Houdini. Also note that any changes you make inside the directory could be overwritten if the asset library is edited in Houdini at the same time.