vsview-split-planes 0.2.4__tar.gz → 0.4.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.
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/.gitignore +160 -4
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/PKG-INFO +2 -1
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/pyproject.toml +1 -0
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/src/vsview_split_planes/__init__.py +34 -26
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/LICENSE +0 -0
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/README.md +0 -0
- {vsview_split_planes-0.2.4 → vsview_split_planes-0.4.0}/src/vsview_split_planes/py.typed +0 -0
|
@@ -1,3 +1,153 @@
|
|
|
1
|
+
## TS/JS
|
|
2
|
+
# Logs
|
|
3
|
+
logs
|
|
4
|
+
*.log
|
|
5
|
+
npm-debug.log*
|
|
6
|
+
yarn-debug.log*
|
|
7
|
+
yarn-error.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
+
|
|
13
|
+
# Runtime data
|
|
14
|
+
pids
|
|
15
|
+
*.pid
|
|
16
|
+
*.seed
|
|
17
|
+
*.pid.lock
|
|
18
|
+
|
|
19
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
20
|
+
lib-cov
|
|
21
|
+
|
|
22
|
+
# Coverage directory used by tools like istanbul
|
|
23
|
+
coverage
|
|
24
|
+
*.lcov
|
|
25
|
+
|
|
26
|
+
# nyc test coverage
|
|
27
|
+
.nyc_output
|
|
28
|
+
|
|
29
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
30
|
+
.grunt
|
|
31
|
+
|
|
32
|
+
# Bower dependency directory (https://bower.io/)
|
|
33
|
+
bower_components
|
|
34
|
+
|
|
35
|
+
# node-waf configuration
|
|
36
|
+
.lock-wscript
|
|
37
|
+
|
|
38
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
39
|
+
build/Release
|
|
40
|
+
|
|
41
|
+
# Dependency directories
|
|
42
|
+
node_modules/
|
|
43
|
+
jspm_packages/
|
|
44
|
+
|
|
45
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
46
|
+
web_modules/
|
|
47
|
+
|
|
48
|
+
# TypeScript cache
|
|
49
|
+
*.tsbuildinfo
|
|
50
|
+
|
|
51
|
+
# Optional npm cache directory
|
|
52
|
+
.npm
|
|
53
|
+
|
|
54
|
+
# Optional eslint cache
|
|
55
|
+
.eslintcache
|
|
56
|
+
|
|
57
|
+
# Optional stylelint cache
|
|
58
|
+
.stylelintcache
|
|
59
|
+
|
|
60
|
+
# Optional REPL history
|
|
61
|
+
.node_repl_history
|
|
62
|
+
|
|
63
|
+
# Output of 'npm pack'
|
|
64
|
+
*.tgz
|
|
65
|
+
|
|
66
|
+
# Yarn Integrity file
|
|
67
|
+
.yarn-integrity
|
|
68
|
+
|
|
69
|
+
# dotenv environment variable files
|
|
70
|
+
.env
|
|
71
|
+
.env.*
|
|
72
|
+
!.env.example
|
|
73
|
+
|
|
74
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
75
|
+
.cache
|
|
76
|
+
.parcel-cache
|
|
77
|
+
|
|
78
|
+
# Next.js build output
|
|
79
|
+
.next
|
|
80
|
+
out
|
|
81
|
+
|
|
82
|
+
# Nuxt.js build / generate output
|
|
83
|
+
.nuxt
|
|
84
|
+
dist
|
|
85
|
+
.output
|
|
86
|
+
|
|
87
|
+
# Gatsby files
|
|
88
|
+
.cache/
|
|
89
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
90
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
91
|
+
# public
|
|
92
|
+
|
|
93
|
+
# vuepress build output
|
|
94
|
+
.vuepress/dist
|
|
95
|
+
|
|
96
|
+
# vuepress v2.x temp directory
|
|
97
|
+
.temp
|
|
98
|
+
|
|
99
|
+
# Sveltekit cache directory
|
|
100
|
+
.svelte-kit/
|
|
101
|
+
|
|
102
|
+
# vitepress build output
|
|
103
|
+
**/.vitepress/dist
|
|
104
|
+
|
|
105
|
+
# vitepress cache directory
|
|
106
|
+
**/.vitepress/cache
|
|
107
|
+
|
|
108
|
+
# Docusaurus cache and generated files
|
|
109
|
+
.docusaurus
|
|
110
|
+
|
|
111
|
+
# Serverless directories
|
|
112
|
+
.serverless/
|
|
113
|
+
|
|
114
|
+
# FuseBox cache
|
|
115
|
+
.fusebox/
|
|
116
|
+
|
|
117
|
+
# DynamoDB Local files
|
|
118
|
+
.dynamodb/
|
|
119
|
+
|
|
120
|
+
# Firebase cache directory
|
|
121
|
+
.firebase/
|
|
122
|
+
|
|
123
|
+
# TernJS port file
|
|
124
|
+
.tern-port
|
|
125
|
+
|
|
126
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
127
|
+
.vscode-test
|
|
128
|
+
|
|
129
|
+
# pnpm
|
|
130
|
+
.pnpm-store
|
|
131
|
+
|
|
132
|
+
# yarn v3
|
|
133
|
+
.pnp.*
|
|
134
|
+
.yarn/*
|
|
135
|
+
!.yarn/patches
|
|
136
|
+
!.yarn/plugins
|
|
137
|
+
!.yarn/releases
|
|
138
|
+
!.yarn/sdks
|
|
139
|
+
!.yarn/versions
|
|
140
|
+
|
|
141
|
+
# Vite files
|
|
142
|
+
vite.config.js.timestamp-*
|
|
143
|
+
vite.config.ts.timestamp-*
|
|
144
|
+
.vite/
|
|
145
|
+
|
|
146
|
+
# Repo specific
|
|
147
|
+
web_dist/
|
|
148
|
+
sboms-js.cdx.json
|
|
149
|
+
|
|
150
|
+
## Python
|
|
1
151
|
# Byte-compiled / optimized / DLL files
|
|
2
152
|
__pycache__/
|
|
3
153
|
*.py[codz]
|
|
@@ -196,11 +346,13 @@ cython_debug/
|
|
|
196
346
|
.abstra/
|
|
197
347
|
|
|
198
348
|
# Visual Studio Code
|
|
199
|
-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
349
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
200
350
|
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
201
|
-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
351
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
202
352
|
# you could uncomment the following to ignore the entire vscode folder
|
|
203
|
-
|
|
353
|
+
.vscode/*
|
|
354
|
+
!.vscode/tasks.json
|
|
355
|
+
!.vscode/extensions.json
|
|
204
356
|
|
|
205
357
|
# Ruff stuff:
|
|
206
358
|
.ruff_cache/
|
|
@@ -224,4 +376,8 @@ vs_objects.inv
|
|
|
224
376
|
vs_fixed.inv
|
|
225
377
|
|
|
226
378
|
# Doc workraws
|
|
227
|
-
docs/assets/raws
|
|
379
|
+
docs/assets/raws
|
|
380
|
+
|
|
381
|
+
# Local AGENTS.md
|
|
382
|
+
AGENTS.md
|
|
383
|
+
.vitest/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vsview-split-planes
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A vsview plugin displaying video clips' constituent planes
|
|
5
5
|
Project-URL: Documentation, https://jaded-encoding-thaumaturgy.github.io/vs-view/plugins/second-party/#split-planes
|
|
6
6
|
Project-URL: Source Code, https://github.com/Jaded-Encoding-Thaumaturgy/vs-view/tree/main/src/plugins/split-planes
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
19
|
Classifier: Typing :: Typed
|
|
19
20
|
Requires-Python: >=3.12
|
|
20
21
|
Requires-Dist: vapoursynth-akarin>=1.4.0
|
|
@@ -20,6 +20,7 @@ classifiers = [
|
|
|
20
20
|
"Programming Language :: Python :: 3.12",
|
|
21
21
|
"Programming Language :: Python :: 3.13",
|
|
22
22
|
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Programming Language :: Python :: 3.15",
|
|
23
24
|
"Operating System :: OS Independent",
|
|
24
25
|
"Typing :: Typed",
|
|
25
26
|
]
|
|
@@ -3,7 +3,7 @@ from typing import Annotated, Any, Literal, assert_never, override
|
|
|
3
3
|
|
|
4
4
|
from jetpytools import fallback
|
|
5
5
|
from pydantic import BaseModel
|
|
6
|
-
from PySide6.QtCore import Slot
|
|
6
|
+
from PySide6.QtCore import QSignalBlocker, QTimer, Slot
|
|
7
7
|
from PySide6.QtWidgets import QBoxLayout, QDoubleSpinBox, QHBoxLayout, QLabel, QVBoxLayout, QWidget, QWidgetAction
|
|
8
8
|
from vapoursynth import VideoNode
|
|
9
9
|
from vstools import scale_mask, stack_planes
|
|
@@ -46,9 +46,9 @@ class GlobalSettings(BaseModel):
|
|
|
46
46
|
label="Offset chroma",
|
|
47
47
|
items=[("Fixed", 0.0), ("Min", "min"), ("Max", "max")],
|
|
48
48
|
tooltip="Apply chroma plane offsetting\n"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"-
|
|
49
|
+
"- Fixed: no offset. Set a custom value from the view context menu\n"
|
|
50
|
+
"- Min: move each chroma plane so its frame minimum sits at the lowest chroma value of the format\n"
|
|
51
|
+
"- Max: move each chroma plane so its frame maximum sits at the peak chroma value of the format",
|
|
52
52
|
),
|
|
53
53
|
] = 0.0
|
|
54
54
|
mode: Annotated[
|
|
@@ -104,11 +104,19 @@ class SplitPlanesPlugin(WidgetPluginBase[GlobalSettings, LocalSettings]):
|
|
|
104
104
|
self.current_layout.setSpacing(0)
|
|
105
105
|
self.current_layout.addWidget(self.view)
|
|
106
106
|
|
|
107
|
+
self._applied_settings = self.settings.global_.model_dump()
|
|
107
108
|
self.api.globalSettingsChanged.connect(self.on_settings_changed)
|
|
108
109
|
|
|
109
110
|
@Slot()
|
|
110
111
|
def on_settings_changed(self) -> None:
|
|
111
|
-
|
|
112
|
+
if (current := self.settings.global_.model_dump()) == self._applied_settings:
|
|
113
|
+
return
|
|
114
|
+
|
|
115
|
+
if current["autofit"] != self._applied_settings["autofit"]:
|
|
116
|
+
self.view.set_autofit(fallback(self.settings.local_.autofit, self.settings.global_.autofit))
|
|
117
|
+
|
|
118
|
+
self._applied_settings = current
|
|
119
|
+
|
|
112
120
|
self.view.refresh()
|
|
113
121
|
self.view.sync_offset_controls_from_settings()
|
|
114
122
|
|
|
@@ -161,6 +169,9 @@ class SplitPlanesView(PluginGraphicsView):
|
|
|
161
169
|
action.setDefaultWidget(self._offset_container)
|
|
162
170
|
self.context_menu.addAction(action)
|
|
163
171
|
|
|
172
|
+
self._offset_timer = QTimer(self, singleShot=True, interval=300)
|
|
173
|
+
self._offset_timer.timeout.connect(self._apply_offset_spinbox)
|
|
174
|
+
|
|
164
175
|
# Connect signals
|
|
165
176
|
self.offset_segment.segmentChanged.connect(self.on_offset_segment_changed)
|
|
166
177
|
self.offset_spinbox.valueChanged.connect(self.on_offset_spinbox_changed)
|
|
@@ -168,23 +179,15 @@ class SplitPlanesView(PluginGraphicsView):
|
|
|
168
179
|
# Set initial state from global settings
|
|
169
180
|
self.sync_offset_controls_from_settings()
|
|
170
181
|
|
|
171
|
-
|
|
172
|
-
self.autofit_action.trigger()
|
|
173
|
-
|
|
174
|
-
@override
|
|
175
|
-
def parent(self) -> SplitPlanesPlugin:
|
|
176
|
-
if isinstance(parent := super().parent(), SplitPlanesPlugin):
|
|
177
|
-
return parent
|
|
178
|
-
|
|
179
|
-
raise NotImplementedError
|
|
182
|
+
self.set_autofit(fallback(self.settings.local_.autofit, self.settings.global_.autofit))
|
|
180
183
|
|
|
181
184
|
@override
|
|
182
185
|
def get_node(self, clip: VideoNode) -> VideoNode:
|
|
183
|
-
if (offset_chroma := self.settings.local_.offset_chroma)
|
|
184
|
-
offset = False
|
|
186
|
+
if not (offset_chroma := self.settings.local_.offset_chroma):
|
|
187
|
+
offset: Literal["min", "max", False] | float = False
|
|
185
188
|
elif isinstance(offset_chroma, (float, int)):
|
|
186
|
-
|
|
187
|
-
offset = copysign(
|
|
189
|
+
scaled = scale_mask(abs(offset_chroma), 32, clip)
|
|
190
|
+
offset = copysign(scaled, offset_chroma)
|
|
188
191
|
else:
|
|
189
192
|
offset = offset_chroma
|
|
190
193
|
|
|
@@ -203,7 +206,8 @@ class SplitPlanesView(PluginGraphicsView):
|
|
|
203
206
|
case int() | float() | None:
|
|
204
207
|
self.offset_segment.index = 0
|
|
205
208
|
self.fixed_spinbox_container.setEnabled(True)
|
|
206
|
-
self.offset_spinbox
|
|
209
|
+
with QSignalBlocker(self.offset_spinbox):
|
|
210
|
+
self.offset_spinbox.setValue(offset or 0)
|
|
207
211
|
case "min":
|
|
208
212
|
self.offset_segment.index = 1
|
|
209
213
|
self.fixed_spinbox_container.setEnabled(False)
|
|
@@ -216,31 +220,35 @@ class SplitPlanesView(PluginGraphicsView):
|
|
|
216
220
|
@Slot(int)
|
|
217
221
|
def on_offset_segment_changed(self, index: int) -> None:
|
|
218
222
|
self.fixed_spinbox_container.setEnabled(index == 0)
|
|
219
|
-
parent = self.parent()
|
|
220
223
|
|
|
221
224
|
match index:
|
|
222
225
|
case 0:
|
|
223
|
-
|
|
226
|
+
offset = self.offset_spinbox.value()
|
|
224
227
|
case 1:
|
|
225
|
-
|
|
228
|
+
offset = "min"
|
|
226
229
|
case 2:
|
|
227
|
-
|
|
230
|
+
offset = "max"
|
|
228
231
|
case _:
|
|
229
232
|
raise NotImplementedError
|
|
230
233
|
|
|
234
|
+
self.settings.local_.offset_chroma = offset # type: ignore[assignment]
|
|
235
|
+
|
|
231
236
|
self.refresh()
|
|
232
237
|
|
|
233
238
|
@Slot(float)
|
|
234
239
|
def on_offset_spinbox_changed(self, value: float) -> None:
|
|
240
|
+
self._offset_timer.start()
|
|
241
|
+
|
|
242
|
+
@Slot()
|
|
243
|
+
def _apply_offset_spinbox(self) -> None:
|
|
235
244
|
if self.offset_segment.index == 0:
|
|
236
|
-
self.
|
|
245
|
+
self.settings.local_.offset_chroma = self.offset_spinbox.value()
|
|
237
246
|
self.refresh()
|
|
238
247
|
|
|
239
248
|
@override
|
|
240
249
|
def _on_autofit_action(self) -> None:
|
|
241
250
|
super()._on_autofit_action()
|
|
242
|
-
|
|
243
|
-
self.parent().update_local_settings(autofit=self.autofit)
|
|
251
|
+
self.settings.local_.autofit = self.autofit
|
|
244
252
|
|
|
245
253
|
|
|
246
254
|
@hookimpl
|
|
File without changes
|
|
File without changes
|
|
File without changes
|