better loader error handling

This commit is contained in:
Ondrej Samohel 2021-08-11 22:06:44 +02:00
parent c5cf15aca7
commit e3116b0bd0
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
11 changed files with 24 additions and 11 deletions

View file

@ -1,6 +1,19 @@
# -*- coding: utf-8 -*-
"""Houdini specific Avalon/Pyblish plugin definitions."""
import sys
from avalon import houdini
import hou
import six
from openpype.api import PypeCreatorMixin
class Creator(PypeCreatorMixin, houdini.Creator):
pass
def process(self):
# reraise as standard Python exception so
# Avalon can catch it
try:
self._process()
except hou.Error as er:
six.reraise(Exception, er, sys.exc_info()[2])

View file

@ -18,7 +18,7 @@ class CreateAlembicCamera(plugin.Creator):
# Set node type to create for output
self.data.update({"node_type": "alembic"})
def process(self):
def _process(self):
instance = super(CreateAlembicCamera, self).process()
parms = {

View file

@ -17,7 +17,7 @@ class CreateCompositeSequence(plugin.Creator):
# Type of ROP node to create
self.data.update({"node_type": "comp"})
def process(self):
def _process(self):
instance = super(CreateCompositeSequence, self).process()
parms = {"copoutput": "$HIP/pyblish/%s.$F4.exr" % self.name}

View file

@ -17,7 +17,7 @@ class CreatePointCache(plugin.Creator):
self.data.update({"node_type": "alembic"})
def process(self):
def _process(self):
instance = super(CreatePointCache, self).process()
parms = {

View file

@ -27,7 +27,7 @@ class CreateRedshiftROP(plugin.Creator):
self.data.update({"node_type": "Redshift_ROP"})
def process(self):
def _process(self):
instance = super(CreateRedshiftROP, self).process()
basename = instance.name()

View file

@ -9,7 +9,7 @@ class CreateRemotePublish(plugin.Creator):
family = "remotePublish"
icon = "cloud-upload"
def process(self):
def _process(self):
"""This is a stub creator process.
This does not create a regular instance that the instance collector

View file

@ -16,7 +16,7 @@ class CreateUSD(plugin.Creator):
self.data.update({"node_type": "usd"})
def process(self):
def _process(self):
instance = super(CreateUSD, self).process()
parms = {

View file

@ -10,7 +10,7 @@ class CreateUSDModel(plugin.Creator):
family = "usdModel"
icon = "gears"
def process(self):
def _process(self):
node_type = "op::author_model:1.0"

View file

@ -10,7 +10,7 @@ class _USDWorkspace(plugin.Creator):
step = None
icon = "gears"
def process(self):
def _process(self):
if not all([self.node_type, self.node_name, self.step]):
self.log.error("Incomplete USD Workspace parameters")

View file

@ -19,7 +19,7 @@ class CreateUSDRender(plugin.Creator):
self.data.update({"node_type": "usdrender_rop"})
def process(self):
def _process(self):
instance = super(CreateUSDRender, self).process()
parms = {

View file

@ -18,7 +18,7 @@ class CreateVDBCache(plugin.Creator):
# Set node type to create for output
self.data["node_type"] = "geometry"
def process(self):
def _process(self):
instance = super(CreateVDBCache, self).process()
parms = {