mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #217 from BigRoy/houdini_fixes
Fix PLN-220: ROP render error hangs Pyblish
This commit is contained in:
commit
3f9b9a193e
2 changed files with 22 additions and 2 deletions
|
|
@ -13,6 +13,8 @@ class ExtractAlembic(colorbleed.api.Extractor):
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
|
|
||||||
|
import hou
|
||||||
|
|
||||||
ropnode = instance[0]
|
ropnode = instance[0]
|
||||||
|
|
||||||
# Get the filename from the filename parameter
|
# Get the filename from the filename parameter
|
||||||
|
|
@ -25,7 +27,15 @@ class ExtractAlembic(colorbleed.api.Extractor):
|
||||||
# We run the render
|
# We run the render
|
||||||
self.log.info("Writing alembic '%s' to '%s'" % (file_name,
|
self.log.info("Writing alembic '%s' to '%s'" % (file_name,
|
||||||
staging_dir))
|
staging_dir))
|
||||||
ropnode.render()
|
try:
|
||||||
|
ropnode.render()
|
||||||
|
except hou.Error as exc:
|
||||||
|
# The hou.Error is not inherited from a Python Exception class,
|
||||||
|
# so we explicitly capture the houdini error, otherwise pyblish
|
||||||
|
# will remain hanging.
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
raise RuntimeError("Render failed: {0}".format(exc))
|
||||||
|
|
||||||
if "files" not in instance.data:
|
if "files" not in instance.data:
|
||||||
instance.data["files"] = []
|
instance.data["files"] = []
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ class ExtractVDBCache(colorbleed.api.Extractor):
|
||||||
|
|
||||||
def process(self, instance):
|
def process(self, instance):
|
||||||
|
|
||||||
|
import hou
|
||||||
|
|
||||||
ropnode = instance[0]
|
ropnode = instance[0]
|
||||||
|
|
||||||
# Get the filename from the filename parameter
|
# Get the filename from the filename parameter
|
||||||
|
|
@ -23,7 +25,15 @@ class ExtractVDBCache(colorbleed.api.Extractor):
|
||||||
file_name = os.path.basename(sop_output)
|
file_name = os.path.basename(sop_output)
|
||||||
|
|
||||||
self.log.info("Writing VDB '%s' to '%s'" % (file_name, staging_dir))
|
self.log.info("Writing VDB '%s' to '%s'" % (file_name, staging_dir))
|
||||||
ropnode.render()
|
try:
|
||||||
|
ropnode.render()
|
||||||
|
except hou.Error as exc:
|
||||||
|
# The hou.Error is not inherited from a Python Exception class,
|
||||||
|
# so we explicitly capture the houdini error, otherwise pyblish
|
||||||
|
# will remain hanging.
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
raise RuntimeError("Render failed: {0}".format(exc))
|
||||||
|
|
||||||
if "files" not in instance.data:
|
if "files" not in instance.data:
|
||||||
instance.data["files"] = []
|
instance.data["files"] = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue