mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Enable "Force Copy" option.
In cases where hardlinking is not an option (cloud syncing), copying is the only option.
This commit is contained in:
parent
ae3496ceea
commit
3f3932cff1
2 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue