mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge pull request #5886 from ynput/bugfix/houdini-license-validator
This commit is contained in:
commit
05bbff0790
1 changed files with 21 additions and 14 deletions
|
|
@ -1,32 +1,39 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import pyblish.api
|
||||
from openpype.pipeline import PublishValidationError
|
||||
import hou
|
||||
|
||||
|
||||
class ValidateHoudiniCommercialLicense(pyblish.api.InstancePlugin):
|
||||
"""Validate the Houdini instance runs a Commercial license.
|
||||
class ValidateHoudiniNotApprenticeLicense(pyblish.api.InstancePlugin):
|
||||
"""Validate the Houdini instance runs a non Apprentice license.
|
||||
|
||||
When extracting USD files from a non-commercial Houdini license, even with
|
||||
Houdini Indie license, the resulting files will get "scrambled" with
|
||||
a license protection and get a special .usdnc or .usdlc suffix.
|
||||
USD ROPs:
|
||||
When extracting USD files from an apprentice Houdini license,
|
||||
the resulting files will get "scrambled" with a license protection
|
||||
and get a special .usdnc suffix.
|
||||
|
||||
This currently breaks the Subset/representation pipeline so we disallow
|
||||
any publish with those licenses. Only the commercial license is valid.
|
||||
This currently breaks the Subset/representation pipeline so we disallow
|
||||
any publish with apprentice license.
|
||||
|
||||
Alembic ROPs:
|
||||
Houdini Apprentice does not export Alembic.
|
||||
"""
|
||||
|
||||
order = pyblish.api.ValidatorOrder
|
||||
families = ["usd"]
|
||||
families = ["usd", "abc"]
|
||||
hosts = ["houdini"]
|
||||
label = "Houdini Commercial License"
|
||||
label = "Houdini Apprentice License"
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
import hou
|
||||
if hou.isApprentice():
|
||||
# Find which family was matched with the plug-in
|
||||
families = {instance.data["family"]}
|
||||
families.update(instance.data.get("families", []))
|
||||
disallowed_families = families.intersection(self.families)
|
||||
families = " ".join(sorted(disallowed_families)).title()
|
||||
|
||||
license = hou.licenseCategory()
|
||||
if license != hou.licenseCategoryType.Commercial:
|
||||
raise PublishValidationError(
|
||||
("USD Publishing requires a full Commercial "
|
||||
"license. You are on: {}").format(license),
|
||||
"{} publishing requires a non apprentice license."
|
||||
.format(families),
|
||||
title=self.label)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue