libreflow.extensions.sk.export-psd-layers 1.1.6__tar.gz → 1.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/CHANGELOG.md +5 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6/src/libreflow.extensions.sk.export_psd_layers.egg-info → libreflow_extensions_sk_export_psd_layers-1.1.7}/PKG-INFO +6 -1
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow/extensions/sk/export_psd_layers/__init__.py +186 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow/extensions/sk/export_psd_layers/_version.py +3 -3
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7/src/libreflow.extensions.sk.export_psd_layers.egg-info}/PKG-INFO +6 -1
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/MANIFEST.in +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/README.md +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/setup.cfg +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/setup.py +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow/__init__.py +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow/extensions/__init__.py +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow/extensions/sk/__init__.py +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow.extensions.sk.export_psd_layers.egg-info/SOURCES.txt +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow.extensions.sk.export_psd_layers.egg-info/dependency_links.txt +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow.extensions.sk.export_psd_layers.egg-info/requires.txt +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/src/libreflow.extensions.sk.export_psd_layers.egg-info/top_level.txt +0 -0
- {libreflow_extensions_sk_export_psd_layers-1.1.6 → libreflow_extensions_sk_export_psd_layers-1.1.7}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libreflow.extensions.sk.export_psd_layers
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.7
|
|
4
4
|
Home-page: https://gitlab.com/lfs.coop/libreflow/libreflow_launcher
|
|
5
5
|
Author: Thomas Thiebaut
|
|
6
6
|
Author-email: autor@les-fees-speciales.coop
|
|
@@ -50,6 +50,11 @@ Types of changes
|
|
|
50
50
|
|
|
51
51
|
## [Unreleased]
|
|
52
52
|
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
* Warning message when publishing regarding resolution and colour depth.
|
|
56
|
+
* Message in the window when creating a new working copy.
|
|
57
|
+
|
|
53
58
|
## [1.1.6] - 2025-08-07
|
|
54
59
|
|
|
55
60
|
### Fixed
|
|
@@ -12,8 +12,16 @@ from libreflow.baseflow.file import (
|
|
|
12
12
|
FileRevisionNameChoiceValue,
|
|
13
13
|
UploadPNGToKitsu,
|
|
14
14
|
PublishAndRenderPlayblast,
|
|
15
|
+
PublishFileAction,
|
|
16
|
+
UploadAfterPublishValue,
|
|
17
|
+
CreateWorkingCopyAction,
|
|
15
18
|
)
|
|
16
19
|
from psd_tools import PSDImage
|
|
20
|
+
from psd_tools.psd import PSD
|
|
21
|
+
|
|
22
|
+
from libreflow.baseflow.task import Task
|
|
23
|
+
from libreflow.baseflow.task_manager import CreateTaskDefaultFiles
|
|
24
|
+
from libreflow.baseflow.users import PresetValue, PresetSessionValue, PresetChoiceValue
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
class ExportPSDLayers(flow.Action):
|
|
@@ -424,6 +432,10 @@ class ExportPSDLayersBatch(flow.Action):
|
|
|
424
432
|
class PublishandExportPSD(PublishAndRenderPlayblast):
|
|
425
433
|
ICON = ('icons.libreflow', 'publish')
|
|
426
434
|
|
|
435
|
+
_shot = flow.Parent(5)
|
|
436
|
+
_sequence = flow.Parent(7)
|
|
437
|
+
_film = flow.Parent(9)
|
|
438
|
+
|
|
427
439
|
def allow_context(self, context):
|
|
428
440
|
return (
|
|
429
441
|
context
|
|
@@ -431,7 +443,56 @@ class PublishandExportPSD(PublishAndRenderPlayblast):
|
|
|
431
443
|
and self._file.format.get() in ["psd", "psb"]
|
|
432
444
|
)
|
|
433
445
|
|
|
446
|
+
def get_bg_layout(self):
|
|
447
|
+
source_file = None
|
|
448
|
+
shot_entity = (
|
|
449
|
+
self.root()
|
|
450
|
+
.project()
|
|
451
|
+
.films[self._film.name()]
|
|
452
|
+
.sequences[self._sequence.name()]
|
|
453
|
+
.shots[self._shot.name()]
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
bg_layout_task = shot_entity.tasks["bg_layout"]
|
|
457
|
+
if bg_layout_task.files.has_file("bg_layout", "psb"):
|
|
458
|
+
# Get the file path as parent
|
|
459
|
+
source_file = bg_layout_task.files["bg_layout_psb"].get_head_revision()
|
|
460
|
+
|
|
461
|
+
return source_file
|
|
462
|
+
|
|
434
463
|
def get_buttons(self):
|
|
464
|
+
msg = "<h2>Publish and Export Preview</h2>"
|
|
465
|
+
|
|
466
|
+
if "bg_color" in self._file.name():
|
|
467
|
+
bg_layout_file = self.get_bg_layout()
|
|
468
|
+
bg_layout_psb = PSDImage.open(bg_layout_file.get_path())
|
|
469
|
+
working_copy_path = self._file.get_working_copy().get_path()
|
|
470
|
+
psb = PSDImage.open(working_copy_path)
|
|
471
|
+
|
|
472
|
+
if psb.size != bg_layout_psb.size:
|
|
473
|
+
msg += (f"""<h3><font color=#D66500>
|
|
474
|
+
Does not conform to the size of bg_layout.
|
|
475
|
+
</font></h3>
|
|
476
|
+
<h4><font color=#D66500>
|
|
477
|
+
BG_layout size = {bg_layout_psb.size}
|
|
478
|
+
</font></h4>
|
|
479
|
+
""")
|
|
480
|
+
|
|
481
|
+
if psb.depth != 16:
|
|
482
|
+
msg += (
|
|
483
|
+
"<h3><font color=#D66500>"
|
|
484
|
+
"This file is not in 16-bit format."
|
|
485
|
+
"</font></h3>"
|
|
486
|
+
"<h4><font color=#D66500>"
|
|
487
|
+
"To convert to 16 Bits/Channel, choose `Image > Mode > 16 Bits/Channel`."
|
|
488
|
+
"</font></h4>"
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
self.message.set(msg)
|
|
492
|
+
return ["Cancel"]
|
|
493
|
+
|
|
494
|
+
self.message.set(msg)
|
|
495
|
+
|
|
435
496
|
return ["Publish and Export Preview", "Cancel"]
|
|
436
497
|
|
|
437
498
|
def _configure_and_render(self, revision_name, upload_after_publish):
|
|
@@ -708,6 +769,129 @@ class UploadPSDPreview(UploadPNGToKitsu):
|
|
|
708
769
|
rev.set_status("on_kitsu")
|
|
709
770
|
|
|
710
771
|
|
|
772
|
+
class PublishPSDFile(PublishFileAction):
|
|
773
|
+
|
|
774
|
+
_task = flow.Parent(3)
|
|
775
|
+
_shot = flow.Parent(5)
|
|
776
|
+
_sequence = flow.Parent(7)
|
|
777
|
+
_film = flow.Parent(9)
|
|
778
|
+
|
|
779
|
+
def __init__(self, name, parent):
|
|
780
|
+
super(PublishPSDFile, self).__init__(parent, name)
|
|
781
|
+
|
|
782
|
+
def get_bg_layout(self):
|
|
783
|
+
source_file = None
|
|
784
|
+
shot_entity = (
|
|
785
|
+
self.root()
|
|
786
|
+
.project()
|
|
787
|
+
.films[self._film.name()]
|
|
788
|
+
.sequences[self._sequence.name()]
|
|
789
|
+
.shots[self._shot.name()]
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
bg_layout_task = shot_entity.tasks["bg_layout"]
|
|
793
|
+
if bg_layout_task.files.has_file("bg_layout", "psb"):
|
|
794
|
+
# Get the file path as parent
|
|
795
|
+
source_file = bg_layout_task.files["bg_layout_psb"].get_head_revision()
|
|
796
|
+
|
|
797
|
+
return source_file
|
|
798
|
+
|
|
799
|
+
def get_buttons(self):
|
|
800
|
+
self.check_default_values()
|
|
801
|
+
|
|
802
|
+
msg = "<h2>Publish</h2>"
|
|
803
|
+
|
|
804
|
+
working_copies = self._file.get_working_copies()
|
|
805
|
+
if working_copies:
|
|
806
|
+
user_names = [wc.user.get() for wc in working_copies]
|
|
807
|
+
user_names = ["<b>" + n + "</b>" for n in user_names]
|
|
808
|
+
msg += (
|
|
809
|
+
"<h3><font color=#D66500><br>"
|
|
810
|
+
"This file is currently being edited by one or more users ({})."
|
|
811
|
+
"</font></h3>".format(", ".join(user_names))
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
if "bg_color" in self._file.name():
|
|
815
|
+
bg_layout_file = self.get_bg_layout()
|
|
816
|
+
bg_layout_psb = PSDImage.open(bg_layout_file.get_path())
|
|
817
|
+
working_copy_path = self._file.get_working_copy().get_path()
|
|
818
|
+
psb = PSDImage.open(working_copy_path)
|
|
819
|
+
|
|
820
|
+
if psb.size != bg_layout_psb.size:
|
|
821
|
+
msg += f"""<h3><font color=#D66500>
|
|
822
|
+
Does not conform to the size of bg_layout.
|
|
823
|
+
</font></h3>
|
|
824
|
+
<h4><font color=#D66500>
|
|
825
|
+
BG_layout size = {bg_layout_psb.size}
|
|
826
|
+
</font></h4>
|
|
827
|
+
"""
|
|
828
|
+
|
|
829
|
+
if psb.depth != 16:
|
|
830
|
+
msg += (
|
|
831
|
+
"<h3><font color=#D66500>"
|
|
832
|
+
"This file is not in 16-bit format."
|
|
833
|
+
"</font></h3>"
|
|
834
|
+
"<h4><font color=#D66500>"
|
|
835
|
+
"To convert to 16 Bits/Channel, choose `Image > Mode > 16 Bits/Channel`."
|
|
836
|
+
"</font></h4>"
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
self.message.set(msg)
|
|
840
|
+
return ["Cancel"]
|
|
841
|
+
|
|
842
|
+
self.message.set(msg)
|
|
843
|
+
|
|
844
|
+
return ["Publish", "Cancel"]
|
|
845
|
+
|
|
846
|
+
class CreateWorkingCopy(CreateWorkingCopyAction):
|
|
847
|
+
def __init__(self, parent, name):
|
|
848
|
+
super(CreateWorkingCopy, self).__init__(parent, name)
|
|
849
|
+
|
|
850
|
+
def get_buttons(self):
|
|
851
|
+
msg = "<h3>Create a working copy</h3>"
|
|
852
|
+
|
|
853
|
+
if "bg_color" in self._task.name() and "psb" in self._file.name():
|
|
854
|
+
msg += """<h3>
|
|
855
|
+
Remember to change the colour depth to <u>16 bits</u> in Photoshop.
|
|
856
|
+
</h3>
|
|
857
|
+
<h4>
|
|
858
|
+
To convert to 16 Bits/Channel, choose <u>`Image > Mode > 16 Bits/Channel`</u>.
|
|
859
|
+
</h4>"""
|
|
860
|
+
|
|
861
|
+
# Buttons for Use Base File mode
|
|
862
|
+
if self.use_base_file:
|
|
863
|
+
msg += f"<font color=#FFA34D>WARNING: You should start working on this file \
|
|
864
|
+
from the latest version of {self.base_file_name} in {self.from_task} task.</font>"
|
|
865
|
+
self.message.set(msg)
|
|
866
|
+
return ["Create from base file", "Create from scratch", "Cancel"]
|
|
867
|
+
|
|
868
|
+
if self._file.has_working_copy(from_current_user=True):
|
|
869
|
+
msg += "<font color=#FFA34D>WARNING: You already have a working copy to your name. \
|
|
870
|
+
Choosing to create a new one will overwrite your changes.</font>"
|
|
871
|
+
|
|
872
|
+
self.message.set(msg)
|
|
873
|
+
|
|
874
|
+
self.from_revision.revert_to_default()
|
|
875
|
+
|
|
876
|
+
return ["Create", "Create from scratch", "Cancel"]
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
def publish_psd_file(parent):
|
|
880
|
+
if isinstance(parent, TrackedFile) and "psb" in parent.name():
|
|
881
|
+
r = flow.Child(PublishPSDFile).ui(label="Publish")
|
|
882
|
+
r.name = "publish_action"
|
|
883
|
+
r.index = 25
|
|
884
|
+
return r
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
def create_working_copy(parent):
|
|
888
|
+
if isinstance(parent, TrackedFile) and "psb" in parent.name():
|
|
889
|
+
r = flow.Child(CreateWorkingCopy).ui(label="Create working copy")
|
|
890
|
+
r.name = "create_working_copy_action"
|
|
891
|
+
r.index = 25
|
|
892
|
+
return r
|
|
893
|
+
|
|
894
|
+
|
|
711
895
|
def publish_and_export_preview(parent):
|
|
712
896
|
if isinstance(parent, TrackedFile):
|
|
713
897
|
r = flow.Child(PublishandExportPSD)
|
|
@@ -755,5 +939,7 @@ def install_extensions(session):
|
|
|
755
939
|
export_psd_preview,
|
|
756
940
|
upload_preview,
|
|
757
941
|
publish_and_export_preview,
|
|
942
|
+
publish_psd_file,
|
|
943
|
+
create_working_copy,
|
|
758
944
|
]
|
|
759
945
|
}
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-08-
|
|
11
|
+
"date": "2025-08-19T09:27:05+0000",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.1.
|
|
14
|
+
"full-revisionid": "b1b744a86ee00adf6e955054c0c0088b9bce95a0",
|
|
15
|
+
"version": "1.1.7"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libreflow.extensions.sk.export_psd_layers
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.7
|
|
4
4
|
Home-page: https://gitlab.com/lfs.coop/libreflow/libreflow_launcher
|
|
5
5
|
Author: Thomas Thiebaut
|
|
6
6
|
Author-email: autor@les-fees-speciales.coop
|
|
@@ -50,6 +50,11 @@ Types of changes
|
|
|
50
50
|
|
|
51
51
|
## [Unreleased]
|
|
52
52
|
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
* Warning message when publishing regarding resolution and colour depth.
|
|
56
|
+
* Message in the window when creating a new working copy.
|
|
57
|
+
|
|
53
58
|
## [1.1.6] - 2025-08-07
|
|
54
59
|
|
|
55
60
|
### Fixed
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|