TomRaynor Posted April 18, 2013 Share Posted April 18, 2013 Working late, got loads of WIP renders that I have been doing all day and wish I had a script that would take all of my render snapshots and save them out as exr files to the local "pic" folder rather than me having to manually right click on each one and save them out. Anyone up for a little python challenge? Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted April 19, 2013 Share Posted April 19, 2013 (edited) Hi Tom. There is not much you can do with this in python/hscript. However, you can save current image from IPR view. Here a little python function i wrote. It's a bit hacky, and not very fast, but it works. import houimage_path = r'C:\temp\ipr.png'def saveIPRImage(): desk = hou.ui.curDesktop() ipr = desk.paneTabOfType(hou.paneTabType.IPRViewer) resx, resy = ipr.imageResolution() pixdata = [] for py in reversed(range(resy)): for px in reversed(range(resx)): pixdata.extend(ipr.pixel('C', px, py)) hou.saveImageDataToFile(pixdata, resx, resy, image_path)[/CODE]Unfortunately, there is no way to get access to IPRview snapshots from python/hscript. Edited April 19, 2013 by Stalkerx777 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.