• Digital
  • Physical
  • Contact
  • R&D

Pixels in progress

------------------// DESIGN // VISUALISATION // ANIMATION // CODE //----------------

  • Digital
  • Physical
  • Contact
  • R&D

Houdini - Automate flipbook screenshot with key press

I’ve put together a method for creating a flipbook image and saving it directly to a folder with time and date as the filename, all from a single key press. It uses a python script and a boring bit of setting up. Big time saver in the long run though, if you need to save out single frames from the viewport often like I do.

Here’s how to get it running: (I’ve only tried this on PC but should translate to other platforms)

First of all we need to add the HOUDINI_USER_PREF_DIR to the houdini.env file. This is so we can add custom python modules to Houdini and in this case my little module for creating the flipbook images.

For me it looked like this (But can be anywhere you want to put it): HOUDINI_USER_PREF_DIR="D:/Dropbox/PixelsInProgress/PIP_HoudiniAssets/Presets;&"

Now go to the folder you've linked to in the .env file and add a folder with the name 'python2.7libs'

Download the PIP_FlipBook module here: PIP_FlipBookTools

And place into the 'python2.7libs' folder. Should look something like the image

PIP_FlipBookTools 18_07_2020 17_45_06.png

Next go to This PC -> Documents -> houdinixx.x->scripts and add this script:

456.py

Or if the script already exists add this line: hou.hscript('''alias F12 python -c "'from PIP_FlipBookTools import PIP_FlipBook; PIP_FlipBook.ExportScreenshot()'" ''')

scripts 18_07_2020 17_29_58.png

You can read more about the 456.py script from the houdini docs but essentially it gets called everytime a project is opened and in this case is setting the alias for the F12 key. https://www.sidefx.com/docs/houdini/hom/locations.html

And that should be it! - F12 to automatically make a flip book image with the current camera resolution , saved to a screenshots folder in the project directory.

ScreenshotExample.jpg







tags: sidefx, houdini, Python, script, screenshot, flipbook, tools
Tuesday 03.30.21
Posted by Adam Heslop
 

© Copyright Adam Heslop ----—---------|| PIXELS IN PROGRESS ||-------------- All Rights Reserved. 2025.