Skip to content

Commit

Permalink
Merge branch 'develop' into feature/remove-royalrender-addon
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT authored Jun 27, 2024
2 parents 63083c7 + 52cbe95 commit a1bfd3d
Show file tree
Hide file tree
Showing 319 changed files with 96 additions and 41,951 deletions.
40 changes: 25 additions & 15 deletions client/ayon_core/plugins/publish/integrate_hero_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class IntegrateHeroVersion(
]
# QUESTION/TODO this process should happen on server if crashed due to
# permissions error on files (files were used or user didn't have perms)
# *but all other plugins must be sucessfully completed
# *but all other plugins must be successfully completed

use_hardlinks = False

def process(self, instance):
if not self.is_active(instance.data):
Expand Down Expand Up @@ -617,24 +619,32 @@ def copy_file(self, src_path, dst_path):

self.log.debug("Folder already exists: \"{}\"".format(dirname))

if self.use_hardlinks:
# First try hardlink and copy if paths are cross drive
self.log.debug("Hardlinking file \"{}\" to \"{}\"".format(
src_path, dst_path
))
try:
create_hard_link(src_path, dst_path)
# Return when successful
return

except OSError as exc:
# re-raise exception if different than
# EXDEV - cross drive path
# EINVAL - wrong format, must be NTFS
self.log.debug(
"Hardlink failed with errno:'{}'".format(exc.errno))
if exc.errno not in [errno.EXDEV, errno.EINVAL]:
raise

self.log.debug(
"Hardlinking failed, falling back to regular copy...")

self.log.debug("Copying file \"{}\" to \"{}\"".format(
src_path, dst_path
))

# First try hardlink and copy if paths are cross drive
try:
create_hard_link(src_path, dst_path)
# Return when successful
return

except OSError as exc:
# re-raise exception if different than
# EXDEV - cross drive path
# EINVAL - wrong format, must be NTFS
self.log.debug("Hardlink failed with errno:'{}'".format(exc.errno))
if exc.errno not in [errno.EXDEV, errno.EINVAL]:
raise

shutil.copy(src_path, dst_path)

def version_from_representations(self, project_name, repres):
Expand Down
11 changes: 10 additions & 1 deletion server/settings/publish_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@ class IntegrateHeroVersionModel(BaseSettingsModel):
optional: bool = SettingsField(False, title="Optional")
active: bool = SettingsField(True, title="Active")
families: list[str] = SettingsField(default_factory=list, title="Families")
use_hardlinks: bool = SettingsField(
False, title="Use Hardlinks",
description="When enabled first try to make a hardlink of the version "
"instead of a copy. This helps reduce disk usage, but may "
"create issues.\nFor example there are known issues on "
"Windows being unable to delete any of the hardlinks if "
"any of the links is in use creating issues with updating "
"hero versions.")


class CleanUpModel(BaseSettingsModel):
Expand Down Expand Up @@ -1136,7 +1144,8 @@ class PublishPuginsModel(BaseSettingsModel):
"layout",
"mayaScene",
"simpleUnrealTexture"
]
],
"use_hardlinks": False
},
"CleanUp": {
"paterns": [],
Expand Down
202 changes: 0 additions & 202 deletions server_addon/aftereffects/LICENSE

This file was deleted.

4 changes: 0 additions & 4 deletions server_addon/aftereffects/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions server_addon/aftereffects/client/ayon_aftereffects/__init__.py

This file was deleted.

39 changes: 0 additions & 39 deletions server_addon/aftereffects/client/ayon_aftereffects/addon.py

This file was deleted.

Loading

0 comments on commit a1bfd3d

Please sign in to comment.