follow workfile version can only be enabled through the ayon project setting

This commit is contained in:
Kayla Man 2024-06-05 13:18:51 +08:00
parent 7fd7512289
commit 8403e2f218
2 changed files with 11 additions and 21 deletions

View file

@ -313,8 +313,14 @@ class CollectAnatomyInstanceData(pyblish.api.ContextPlugin):
# Define version
version_number = None
if self.follow_workfile_version or instance.data.get(
"follow_workfile_version", self.follow_workfile_version):
# Allow an instance to force enable or disable the version
# following of the current context
use_context_version = self.follow_workfile_version
if "followWorkfileVersion" in instance.data:
use_context_version = instance.data["followWorkfileVersion"]
if use_context_version:
version_number = context.data("version")
# Even if 'follow_workfile_version' is enabled, it may not be set