The Challenge of Tracking Changes in Houdini Hipfiles
While working with Houdini scenes, there have been several times when I've found myself sifting through various versions of a hipfile, trying to pinpoint the exact changes I made or debug an issue that cropped up between iterations. For example, in development, git offers powerful diff functionalities for code; there hasn't been a straightforward way to achieve this for Houdini hipfiles. Recognizing this gap, I embarked on a journey to create a solution that would make it easier for artists to track and understand the modifications made to our projects.
Introducing the Houdini Hipfile Diff Tool
I'm excited to introduce a new tool I've developed for Houdini: a difference viewer for hipfiles tailored for the Houdini environment using Houdini's hython 3.9 included with each Houdini version. This tool is reminiscent of the 'git diff' functionality, but it's specifically designed for comparing Houdini project files. Let's have a look at what that is.
How to Use the Houdini Hipfile Diff Tool
Getting started with the tool is simple:
- Setup: Begin by cloning the tool's repository to your desired directory.
- Launching: Utilize Houdini's Hython 3.9 to run the tool. This interpreter is bundled with Houdini installations, typically located at ".../Side Effects Software/Houdini 19.5.368/bin/hython3.9.exe". To start the tool, execute main.py with Hython
For UI, I've designed the user interface using Qt from the Houdini distribution. Upon launching, a new window will appear. Here's a brief overview of the UI:
- Top Section: Two input fields for specifying hipfiles and adjacent folder icon buttons for easy file browsing.
- Middle Section: A spacious area that will display the node trees once files are loaded.
- Bottom Section: Dual search bars for filtering nodes and a checkbox at the bottom left for additional settings.
- Action Button: A 'Compare' button to initiate the comparison process.
Key Features:
- Dual-View Comparison: Simply specify your source and target hipfiles, and the tool will display two synchronized node trees side by side. This allows for an intuitive comparison, highlighting the differences between the two files.
- Visual Indicators: Edited nodes are color-coded for clarity. New additions are marked in green, deletions in red, and nodes with modifications are hatched, making it easy to spot changes at a glance.
- Synchronized Navigation: The dual trees are fully synchronized. Scrolling in one tree will automatically scroll the other. Similarly, expanding or collapsing a node in one tree will reflect the same action in the other, ensuring a seamless comparison experience.
- Search Functionality: A built-in search feature lets you quickly filter and locate specific nodes in both trees, streamlining the process of pinpointing particular changes or elements.
Get Started with the Houdini Hipfile Diff Tool
For those eager to dive in and explore this tool, I've made it available as an open-source project. You can find the complete code and detailed instructions on launching it from my GitHub repository. I'm passionate about contributing to the Houdini community and welcome any feedback or contributions to improve the tool further.
To get started:
- Clone the repository using git: git clone https://github.com/golubevcg/hip_file_diff_tool
- Navigate to the repository folder and initiate the tool with Houdini's hython3.9: & ".../Side Effects Software/Houdini 19.5.368/bin/hython3.9.exe" .../hip_file_diff_tool/main.py (Ensure you replace '...' with the full path to hython and main.py)
Final Thoughts
While the tool has been tested, it's worth noting that it has yet to reach a good unit test coverage. My primary testing environment has been Houdini's non-commercial version 19.5.368. I'm interested to hear about your experiences and any feedback you have. For feature requests, bug reports, or general discussions, please email me at golubevcg@gmail.com or connect with me on LinkedIn.
17 Sep 2023