Pre-Frame Python script to skip existing frame

   1619   0   1
User Avatar
Member
100 posts
Joined: 9月 2006
Offline
Hello Gang !

Im running a Redshift ROP to export a sequence of RS files.
The problem is the node doesnt have “skip rendered frames”. So Im trying to figure out a way to address that.

Going thru the threads on the forum i was able to write this code:

import os

node = hou.pwd()                                        # Get the node this code is running under.
node.bypass(off)
file_name_in = node.evalParm('RS_archive_sopPath')  	# Fetch the name from the ROP Output panel.
exists = os.path.isfile(file_name_in)
if exists:
	print( " ### FILE EXISTS: " + file_name_in )
	node.bypass(on)

The bypass() methods seems to be out of context. Its throwing:
Closing the RS scene
Error: Python error: Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “//black/d/HOUDINI.PY/file_checkExist_v00.py”, line 4, in <module>
node.bypass(off)
NameError: name ‘off’ is not defined

I switched to using integer as opposed to ‘on/off’. So ‘node.bypass(0)’ and theres no more errors, but still cooking the frames.

Print also seems not to log anything on the command line verbose.

And lastly, this error was logged after the ROP opened the scene, and saved the first frame to disk.

Any light on the matter would be mostly appreciated,
Thanks !
Edited by axelsp - 2017年10月24日 08:55:47
  • Quick Links