Re-order logic so global toggle will always override any other settings

This commit is contained in:
Roy Nieterau 2024-03-25 20:36:49 +01:00
parent b19f640d53
commit e094573b45
2 changed files with 10 additions and 10 deletions

View file

@ -36,11 +36,6 @@ class ValidateOutRelatedNodeIds(pyblish.api.InstancePlugin,
@classmethod
def apply_settings(cls, project_settings):
# Disable plug-in if cbId workflow is disabled
if not project_settings["maya"].get("use_cbid_workflow", True):
cls.enabled = False
return
# Preserve automatic settings applying logic
settings = get_plugin_settings(plugin=cls,
project_settings=project_settings,
@ -48,6 +43,11 @@ class ValidateOutRelatedNodeIds(pyblish.api.InstancePlugin,
category="maya")
apply_plugin_settings_automatically(cls, settings, logger=cls.log)
# Disable plug-in if cbId workflow is disabled
if not project_settings["maya"].get("use_cbid_workflow", True):
cls.enabled = False
return
def process(self, instance):
"""Process all meshes"""
if not self.is_active(instance.data):

View file

@ -38,11 +38,6 @@ class ValidateRigOutSetNodeIds(pyblish.api.InstancePlugin,
@classmethod
def apply_settings(cls, project_settings):
# Disable plug-in if cbId workflow is disabled
if not project_settings["maya"].get("use_cbid_workflow", True):
cls.enabled = False
return
# Preserve automatic settings applying logic
settings = get_plugin_settings(plugin=cls,
project_settings=project_settings,
@ -50,6 +45,11 @@ class ValidateRigOutSetNodeIds(pyblish.api.InstancePlugin,
category="maya")
apply_plugin_settings_automatically(cls, settings, logger=cls.log)
# Disable plug-in if cbId workflow is disabled
if not project_settings["maya"].get("use_cbid_workflow", True):
cls.enabled = False
return
def process(self, instance):
"""Process all meshes"""
if not self.is_active(instance.data):