mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +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):
|
||||
|
||||
import hou
|
||||
|
||||
ropnode = instance[0]
|
||||
|
||||
# Get the filename from the filename parameter
|
||||
|
|
@ -25,7 +27,15 @@ class ExtractAlembic(colorbleed.api.Extractor):
|
|||
# We run the render
|
||||
self.log.info("Writing alembic '%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:
|
||||
instance.data["files"] = []
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class ExtractVDBCache(colorbleed.api.Extractor):
|
|||
|
||||
def process(self, instance):
|
||||
|
||||
import hou
|
||||
|
||||
ropnode = instance[0]
|
||||
|
||||
# Get the filename from the filename parameter
|
||||
|
|
@ -23,7 +25,15 @@ class ExtractVDBCache(colorbleed.api.Extractor):
|
|||
file_name = os.path.basename(sop_output)
|
||||
|
||||
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:
|
||||
instance.data["files"] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue