Skip to content

Instantly share code, notes, and snippets.

@greenvfx
Created January 11, 2017 16:48
Show Gist options
  • Save greenvfx/e4e9245bb1f277d3cf7d5b63fa6b4e43 to your computer and use it in GitHub Desktop.
Save greenvfx/e4e9245bb1f277d3cf7d5b63fa6b4e43 to your computer and use it in GitHub Desktop.
import subprocess
import os
import glob
import sys
a = r"C:\\Program Files\\Side Effects Software\\Houdini 15.0.244.16\\bin\\mantra.exe"
folder = sys.argv[1]
start = int(sys.argv[2])
finish = int(sys.argv[3])
for file in glob.glob(os.path.join(folder, "*.ifd")):
nameFileExt = os.path.basename(file)
nameFile = os.path.splitext(nameFileExt)[0]
frame = int(nameFile.split('.')[-1]) #
if frame <= finish and frame >= start:
print frame
cmd = []
cmd.append(a)
cmd.append('-V')
cmd.append('2a')
cmd.append('-f')
cmd.append(file)
subprocess.Popen(cmd).wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment