update houdini license validator

This commit is contained in:
MustafaJafar 2023-11-08 15:56:37 +02:00
parent 3cd8fc6a0a
commit ea69e9943e

View file

@ -3,30 +3,29 @@ import pyblish.api
from openpype.pipeline import PublishValidationError
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.
When extracting USD files from an apprentice Houdini license,
the resulting files will get "scrambled" with a license protection
and get a special .usdnc or .usdlc suffix.
This currently breaks the Subset/representation pipeline so we disallow
any publish with those licenses. Only the commercial license is valid.
any publish with apprentice license.
"""
order = pyblish.api.ValidatorOrder
families = ["usd"]
hosts = ["houdini"]
label = "Houdini Commercial License"
label = "Houdini Apprentice License"
def process(self, instance):
import hou
license = hou.licenseCategory()
if license != hou.licenseCategoryType.Commercial:
if hou.isApprentice():
raise PublishValidationError(
("USD Publishing requires a full Commercial "
"license. You are on: {}").format(license),
("USD Publishing requires a non apprentice "
"license."),
title=self.label)