Remain silent if cant create RS ROP

This commit is contained in:
Kuba Winnicki 2019-02-21 21:06:50 +01:00
parent 4c500b24e5
commit ec30d1f85b

View File

@ -34,7 +34,10 @@ def rop_redshift():
out = hou.node('/out') out = hou.node('/out')
rop = out.node('Redshift_ROP1') rop = out.node('Redshift_ROP1')
if not rop: if not rop:
rop = out.createNode('Redshift_ROP') try:
rop = out.createNode('Redshift_ROP')
except:
return None, None
rop.moveToGoodPosition() rop.moveToGoodPosition()
rop.parm("ProgressiveRenderingEnabled").set(True) rop.parm("ProgressiveRenderingEnabled").set(True)
rop.parm('PrimaryGIEngine').set('RS_GIENGINE_BRUTE_FORCE') rop.parm('PrimaryGIEngine').set('RS_GIENGINE_BRUTE_FORCE')