Enable "Force Copy" option.

In cases where hardlinking is not an option (cloud syncing), copying is the only option.
This commit is contained in:
Toke Jepsen 2019-08-21 14:29:25 +01:00
parent ae3496ceea
commit 3f3932cff1
2 changed files with 8 additions and 0 deletions

View file

@ -18,3 +18,6 @@ class CreateLook(avalon.maya.Creator):
# Whether to automatically convert the textures to .tx upon publish.
self.data["maketx"] = True
# Enable users to force a copy.
self.data["forceCopy"] = False

View file

@ -203,6 +203,11 @@ class ExtractLook(pype.api.Extractor):
destination = self.resource_destination(
instance, source, do_maketx
)
# Force copy is specified.
if instance.data.get("forceCopy", False):
mode = COPY
if mode == COPY:
transfers.append((source, destination))
elif mode == HARDLINK: