diff --git a/openpype/hosts/houdini/plugins/publish/validate_houdini_license_category.py b/openpype/hosts/houdini/plugins/publish/validate_houdini_license_category.py index f1c52f22c1..5076acda60 100644 --- a/openpype/hosts/houdini/plugins/publish/validate_houdini_license_category.py +++ b/openpype/hosts/houdini/plugins/publish/validate_houdini_license_category.py @@ -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)