Merged in tokejepsen/pype/feature/maya_look_force_copy (pull request #275)

Enable "Force Copy" option.

Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
Toke Jepsen 2019-11-21 20:00:39 +00:00 committed by Milan Kolar
commit 1b8b976088
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

@ -206,6 +206,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: