libreflow.extensions.sk.export-psd-layers 1.0.0__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.
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)[^1].
7
+
8
+ <!---
9
+ Types of changes
10
+
11
+ - Added for new features.
12
+ - Changed for changes in existing functionality.
13
+ - Deprecated for soon-to-be removed features.
14
+ - Removed for now removed features.
15
+ - Fixed for any bug fixes.
16
+ - Security in case of vulnerabilities.
17
+
18
+ -->
19
+
20
+ ## [Unreleased]
21
+
22
+ ## [1.0.0] - 2025-03-27
23
+
24
+ ### Added
25
+
26
+ * Extension to export the layers of a Photoshop project as png images
@@ -0,0 +1,2 @@
1
+ include README.md
2
+ include CHANGELOG.md
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: libreflow.extensions.sk.export_psd_layers
3
+ Version: 1.0.0
4
+ Home-page: https://gitlab.com/lfs.coop/libreflow/libreflow_launcher
5
+ Author: Thomas Thiebaut
6
+ Author-email: autor@les-fees-speciales.coop
7
+ License: LGPLv3+
8
+ Keywords: kabaret libreflow
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: keywords
22
+ Dynamic: license
23
+ Dynamic: requires-python
24
+
25
+ # Sk Export Psd Layers
26
+
27
+ hello world
28
+
29
+
30
+ # Changelog
31
+
32
+ All notable changes to this project will be documented in this file.
33
+
34
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
35
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)[^1].
36
+
37
+ <!---
38
+ Types of changes
39
+
40
+ - Added for new features.
41
+ - Changed for changes in existing functionality.
42
+ - Deprecated for soon-to-be removed features.
43
+ - Removed for now removed features.
44
+ - Fixed for any bug fixes.
45
+ - Security in case of vulnerabilities.
46
+
47
+ -->
48
+
49
+ ## [Unreleased]
50
+
51
+ ## [1.0.0] - 2025-03-27
52
+
53
+ ### Added
54
+
55
+ * Extension to export the layers of a Photoshop project as png images
@@ -0,0 +1,3 @@
1
+ # Sk Export Psd Layers
2
+
3
+ hello world
@@ -0,0 +1,11 @@
1
+ [versioneer]
2
+ VCS = git
3
+ style = pep440
4
+ versionfile_source = src/libreflow/extensions/sk/export_psd_layers/_version.py
5
+ versionfile_build = libreflow/extensions/sk/export_psd_layers/_version.py
6
+ tag_prefix =
7
+
8
+ [egg_info]
9
+ tag_build =
10
+ tag_date = 0
11
+
@@ -0,0 +1,46 @@
1
+ import setuptools
2
+ import versioneer
3
+ import os
4
+
5
+ readme = os.path.normpath(os.path.join(__file__, '..', 'README.md'))
6
+ with open(readme, "r", encoding="utf-8") as fh:
7
+ long_description = fh.read()
8
+
9
+ long_description += '\n\n'
10
+
11
+ changelog = os.path.normpath(os.path.join(__file__, '..', 'CHANGELOG.md'))
12
+ with open(changelog, "r", encoding="utf-8") as fh:
13
+ long_description += fh.read()
14
+
15
+
16
+ setuptools.setup(
17
+
18
+ name="libreflow.extensions.sk.export_psd_layers",
19
+ version=versioneer.get_version(),
20
+ cmdclass=versioneer.get_cmdclass(),
21
+ author="Thomas Thiebaut",
22
+ author_email="autor@les-fees-speciales.coop",
23
+ description="",
24
+ long_description=long_description,
25
+ long_description_content_type="text/markdown",
26
+ url="https://gitlab.com/lfs.coop/libreflow/libreflow_launcher",
27
+ license="LGPLv3+",
28
+ classifiers=[
29
+ "Programming Language :: Python :: 3",
30
+ "Intended Audience :: Developers",
31
+ "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
32
+ "Operating System :: OS Independent",
33
+ ],
34
+ keywords="kabaret libreflow",
35
+ install_requires=[],
36
+ python_requires='>=3.7',
37
+ packages=setuptools.find_packages("src"),
38
+ package_dir={"": "src"},
39
+ package_data={
40
+ '': [
41
+ "*.css",
42
+ '*.png'
43
+ ],
44
+ },
45
+
46
+ )
@@ -0,0 +1,125 @@
1
+ import os
2
+
3
+ from kabaret import flow
4
+ from kabaret.flow.object import _Manager
5
+
6
+ from libreflow.baseflow.file import GenericRunAction,TrackedFile,TrackedFolder,FileRevisionNameChoiceValue
7
+
8
+ class ExportPSDLayers(GenericRunAction):
9
+ _MANAGER_TYPE = _Manager
10
+
11
+ ICON = ('icons.flow', 'photoshop')
12
+
13
+ _file = flow.Parent()
14
+ _files = flow.Parent(2)
15
+ _task = flow.Parent(3)
16
+ _shot = flow.Parent(5)
17
+ _sequence = flow.Parent(7)
18
+
19
+ revision = flow.Param(None, FileRevisionNameChoiceValue)
20
+
21
+ exec_path = ""
22
+
23
+ def allow_context(self, context):
24
+ return (
25
+ context
26
+ and self._file.format.get() in ['psd', 'psb']
27
+ )
28
+
29
+ def needs_dialog(self):
30
+ return True
31
+
32
+ def get_buttons(self):
33
+ self.revision.revert_to_default()
34
+
35
+ msg = ""
36
+
37
+ site_env = self.root().project().get_current_site().site_environment
38
+ if site_env.has_mapped_name('PHOTOSHOP_EXEC_PATH'):
39
+ self.exec_path = site_env['PHOTOSHOP_EXEC_PATH'].value.get()
40
+ self.message.set(msg)
41
+ return ['Export','Cancel']
42
+
43
+ else :
44
+ msg = "<font color = red><b>Photoshop executable not found in site environment</b></font>"
45
+ self.message.set(msg)
46
+ return ['Cancel']
47
+
48
+ def ensure_render_folder(self):
49
+ folder_name = self._file.display_name.get().split('.')[0]
50
+ folder_name += '_render'
51
+
52
+ if not self._files.has_folder(folder_name):
53
+ self._files.create_folder_action.folder_name.set(folder_name)
54
+ self._files.create_folder_action.category.set('Outputs')
55
+ self._files.create_folder_action.tracked.set(True)
56
+ self._files.create_folder_action.run(None)
57
+
58
+ return self._files[folder_name]
59
+
60
+ def ensure_render_folder_revision(self):
61
+ folder = self.ensure_render_folder()
62
+ revision_name = self.revision.get()
63
+ revisions = folder.get_revisions()
64
+ source_revision = self._file.get_revision(self.revision.get())
65
+
66
+ if not folder.has_revision(revision_name):
67
+ revision = folder.add_revision(revision_name)
68
+ folder.set_current_user_on_revision(revision_name)
69
+ else:
70
+ revision = folder.get_revision(revision_name)
71
+
72
+ revision.comment.set(source_revision.comment.get())
73
+
74
+ folder.ensure_last_revision_oid()
75
+
76
+ self._files.touch()
77
+
78
+ return revision
79
+
80
+ def runner_name_and_tags(self):
81
+ return 'Photoshop', []
82
+
83
+ def get_run_label(self):
84
+ return 'Export Layers'
85
+
86
+ def target_file_extension(self):
87
+ if self._file.format.get() == 'psb':
88
+ return 'psb'
89
+ elif self._file.format.get() == 'psd':
90
+ return 'psd'
91
+
92
+ def extra_argv(self):
93
+ rev = self._file.get_revision(self.revision.get())
94
+ current_dir = os.path.split(__file__)[0]
95
+ script_path = os.path.normpath(os.path.join(current_dir,"scripts/LFS_PSD_export_to_PNG.jsx"))
96
+
97
+ return [rev.get_path(),script_path]
98
+
99
+ def run(self, button):
100
+ if button == 'Cancel':
101
+ return
102
+
103
+ folder_path = self.ensure_render_folder_revision().get_path()
104
+
105
+ super(ExportPSDLayers, self).run(button)
106
+ return self.get_result(close=True)
107
+
108
+
109
+ def export_psd_layers(parent):
110
+ if isinstance(parent, TrackedFile):
111
+ r = flow.Child(ExportPSDLayers)
112
+ r.name = 'export_layers'
113
+ return r
114
+
115
+
116
+ def install_extensions(session):
117
+ return {
118
+ "export_psd_layers": [
119
+ export_psd_layers,
120
+ ]
121
+ }
122
+
123
+
124
+ from . import _version
125
+ __version__ = _version.get_versions()['version']
@@ -0,0 +1,21 @@
1
+
2
+ # This file was generated by 'versioneer.py' (0.29) from
3
+ # revision-control system data, or from the parent directory name of an
4
+ # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
+ # of this file.
6
+
7
+ import json
8
+
9
+ version_json = '''
10
+ {
11
+ "date": "2025-03-27T12:06:44+0100",
12
+ "dirty": false,
13
+ "error": null,
14
+ "full-revisionid": "14117b39d39bffa801addc037065b58ad52037c8",
15
+ "version": "1.0.0"
16
+ }
17
+ ''' # END VERSION_JSON
18
+
19
+
20
+ def get_versions():
21
+ return json.loads(version_json)
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: libreflow.extensions.sk.export_psd_layers
3
+ Version: 1.0.0
4
+ Home-page: https://gitlab.com/lfs.coop/libreflow/libreflow_launcher
5
+ Author: Thomas Thiebaut
6
+ Author-email: autor@les-fees-speciales.coop
7
+ License: LGPLv3+
8
+ Keywords: kabaret libreflow
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: keywords
22
+ Dynamic: license
23
+ Dynamic: requires-python
24
+
25
+ # Sk Export Psd Layers
26
+
27
+ hello world
28
+
29
+
30
+ # Changelog
31
+
32
+ All notable changes to this project will be documented in this file.
33
+
34
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
35
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)[^1].
36
+
37
+ <!---
38
+ Types of changes
39
+
40
+ - Added for new features.
41
+ - Changed for changes in existing functionality.
42
+ - Deprecated for soon-to-be removed features.
43
+ - Removed for now removed features.
44
+ - Fixed for any bug fixes.
45
+ - Security in case of vulnerabilities.
46
+
47
+ -->
48
+
49
+ ## [Unreleased]
50
+
51
+ ## [1.0.0] - 2025-03-27
52
+
53
+ ### Added
54
+
55
+ * Extension to export the layers of a Photoshop project as png images
@@ -0,0 +1,15 @@
1
+ CHANGELOG.md
2
+ MANIFEST.in
3
+ README.md
4
+ setup.cfg
5
+ setup.py
6
+ versioneer.py
7
+ src/libreflow/__init__.py
8
+ src/libreflow.extensions.sk.export_psd_layers.egg-info/PKG-INFO
9
+ src/libreflow.extensions.sk.export_psd_layers.egg-info/SOURCES.txt
10
+ src/libreflow.extensions.sk.export_psd_layers.egg-info/dependency_links.txt
11
+ src/libreflow.extensions.sk.export_psd_layers.egg-info/top_level.txt
12
+ src/libreflow/extensions/__init__.py
13
+ src/libreflow/extensions/sk/__init__.py
14
+ src/libreflow/extensions/sk/export_psd_layers/__init__.py
15
+ src/libreflow/extensions/sk/export_psd_layers/_version.py