Merge pull request #256 from pypeclub/bugfix/render-fixes

Attach render to subset sanity check
This commit is contained in:
Milan Kolar 2020-06-16 10:21:58 +02:00 committed by GitHub
commit b4662cdd0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -68,7 +68,7 @@ class CreateRender(avalon.maya.Creator):
_image_prefixes = {
'mentalray': 'maya/<Scene>/<RenderLayer>/<RenderLayer>_<RenderPass>',
'vray': '"maya/<scene>/<Layer>/<Layer>',
'vray': 'maya/<scene>/<Layer>/<Layer>',
'arnold': 'maya/<Scene>/<RenderLayer>/<RenderLayer>_<RenderPass>',
'renderman': 'maya/<Scene>/<layer>/<layer>_<aov>',
'redshift': 'maya/<Scene>/<RenderLayer>/<RenderLayer>_<RenderPass>'

View file

@ -157,7 +157,7 @@ class CollectMayaRender(pyblish.api.ContextPlugin):
# in expectedFiles. If so, raise error as we cannot attach AOV
# (considered to be subset on its own) to another subset
if attach_to:
assert len(exp_files[0].keys()) == 1, (
assert isinstance(exp_files, list), (
"attaching multiple AOVs or renderable cameras to "
"subset is not supported"
)

View file

@ -1,5 +1,5 @@
import pymel.core as pc
from maya import cmds
import pyblish.api
import pype.api
import pype.hosts.maya.action
@ -23,6 +23,11 @@ class ValidateMeshArnoldAttributes(pyblish.api.InstancePlugin):
pype.api.RepairAction
]
optional = True
if cmds.getAttr(
"defaultRenderGlobals.currentRenderer").lower() == "arnold":
active = True
else:
active = False
@classmethod
def get_invalid_attributes(cls, instance, compute=False):