led-controller-version-3-effect-creation 3.0.2__py3-none-any.whl → 3.0.4__py3-none-any.whl

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.
Files changed (26) hide show
  1. {led_controller_version_3_effect_creation-3.0.2.dist-info → led_controller_version_3_effect_creation-3.0.4.dist-info}/METADATA +3 -3
  2. led_controller_version_3_effect_creation-3.0.4.dist-info/RECORD +42 -0
  3. {led_controller_version_3_effect_creation-3.0.2.dist-info → led_controller_version_3_effect_creation-3.0.4.dist-info}/WHEEL +1 -1
  4. lefx/effect_creation/studio/app.py +18 -2
  5. lefx/effect_creation/studio/lab/__init__.py +12 -0
  6. lefx/effect_creation/studio/lab/clock.py +83 -0
  7. lefx/effect_creation/studio/lab/examples.py +88 -0
  8. lefx/effect_creation/studio/lab/inspector.py +416 -0
  9. lefx/effect_creation/studio/lab/output.py +224 -0
  10. lefx/effect_creation/studio/lab/page.py +961 -0
  11. lefx/effect_creation/studio/lab/timeline.py +261 -0
  12. lefx/effect_creation/studio/lab/tree.py +358 -0
  13. lefx/effect_creation/studio/ring.py +25 -9
  14. lefx/effect_creation/studio/session.py +77 -20
  15. lefx/effect_creation/studio/window.py +22 -0
  16. lefx/effect_creation/visual/__init__.py +7 -0
  17. lefx/effect_creation/visual/blocks.py +92 -0
  18. lefx/effect_creation/visual/compiler.py +178 -0
  19. lefx/effect_creation/visual/editor.py +237 -0
  20. lefx/effect_creation/visual/kernel.py +149 -0
  21. lefx/effect_creation/visual/model.py +173 -0
  22. lefx/effect_creation/visual/persistence.py +107 -0
  23. lefx/effect_creation/visual/preview.py +126 -0
  24. lefx/effect_creation/visual/steps.py +150 -0
  25. led_controller_version_3_effect_creation-3.0.2.dist-info/RECORD +0 -25
  26. {led_controller_version_3_effect_creation-3.0.2.dist-info → led_controller_version_3_effect_creation-3.0.4.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: led-controller-version-3-effect-creation
3
- Version: 3.0.2
3
+ Version: 3.0.4
4
4
  Summary: LEFX V3 effect creation: scaffolding, source validation, package building and the desktop studio
5
5
  License-Expression: MIT
6
6
  Keywords: build,editor,effects,gui,led,lefx,packaging
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Topic :: Multimedia :: Graphics
12
12
  Requires-Python: <3.13,>=3.12
13
- Requires-Dist: led-controller-version-3==3.0.2
13
+ Requires-Dist: led-controller-version-3==3.0.4
14
14
  Requires-Dist: pyside6>=6.0.0
15
15
  Requires-Dist: pyyaml<7,>=6.0.2
16
16
  Description-Content-Type: text/markdown
@@ -0,0 +1,42 @@
1
+ lefx/effect_creation/__init__.py,sha256=Ps_d0sqktYXHrMXAVc9-bnxdktFHe84-ddRFmL5LS1c,1426
2
+ lefx/effect_creation/build.py,sha256=ku8xU2dYWZMv5HFbrykJN_REoqZXEIZrolM_cQATe8c,7338
3
+ lefx/effect_creation/cli.py,sha256=K6d_bc0TuMafNewGOsQ6iSu7fDzWS90kGk0kwO6XcNQ,5625
4
+ lefx/effect_creation/imports.py,sha256=vg0uYnlApWTFnGug-t5XW_0N_Yr7DIFkn5ko2fdsuTM,4965
5
+ lefx/effect_creation/scaffold.py,sha256=icg804GV2hPZ04o875qAk3j2tXOb3s0qylfE-etLNL4,10559
6
+ lefx/effect_creation/source.py,sha256=3-UKvFeAZdSeHy_IPnt5SO6lVIOXJbN1lc_tFnHYQ44,8642
7
+ lefx/effect_creation/validate.py,sha256=S1dJMMooqK120QXosSmIo3Hjah3RoF_F7nCOTfYwq5A,9219
8
+ lefx/effect_creation/studio/__init__.py,sha256=YNee9J2bOQvAzBRWf7lOxMTs2K88zzH9G0xelmvT0uM,1996
9
+ lefx/effect_creation/studio/app.py,sha256=3Dwg1axMNqoR7ngMTkVwBSDbz1u2ZpSxLAZo233VlVw,6871
10
+ lefx/effect_creation/studio/authoring.py,sha256=7Da8MMqxNb9t5hICaww7K1rYQX-bYIegd3ZtB8QfxYk,6888
11
+ lefx/effect_creation/studio/blueprint.py,sha256=2nv1YCjXzP9OA8Pbfl6cKYY7g5SqMie4KZHhxKlEOa8,29915
12
+ lefx/effect_creation/studio/calibrate.py,sha256=wNfrX9uyg0uFMHYREWAZ9Y__ZIT8eZHilS4MTJhN5_A,7155
13
+ lefx/effect_creation/studio/calibration_page.py,sha256=LFP8wvYUINR7XpbxP5VLgS5-khnDOFL4eVW3QcEroHM,15888
14
+ lefx/effect_creation/studio/catalogue.py,sha256=eLUvKPdV-X4FgislQuyk6hlb4nCDt-JBGe9jkTRFejE,7056
15
+ lefx/effect_creation/studio/parameters.py,sha256=poUSnfQXUdti_nTJ1uGh6V7l4yiuzUOzG3nLFSnlA08,25360
16
+ lefx/effect_creation/studio/preset_dialog.py,sha256=3LqwX5TOcNSEFCV9JimVl5TgAUks6enihkEn1tQ6vug,6254
17
+ lefx/effect_creation/studio/project.py,sha256=WuoPZXRhnpKL5MsRe1sZxR5DQFNsf1_zv6HV6E2fLis,11459
18
+ lefx/effect_creation/studio/ring.py,sha256=xYBdZZu7lJgwxTT3ZbhK9XQZZ2pcO8Ow1FhaJHXJCQI,7963
19
+ lefx/effect_creation/studio/session.py,sha256=zzTH6jYKhw7Mj5JTkNJj9iH9j2Vonsd96trtGZ2YeUc,13663
20
+ lefx/effect_creation/studio/source_editor.py,sha256=VfakrxZVRVCjEsJrIjIrt4C-zhVU70CEOp5jsm8K9WY,36892
21
+ lefx/effect_creation/studio/window.py,sha256=Fmu5L0h9adEkiDR3oQWom-2MJs-kg0XoZDfAiRGfTuk,27139
22
+ lefx/effect_creation/studio/lab/__init__.py,sha256=yAs8TRmSu5lv-V7sgnhgNMKhccA9XX6fGHVFjyxoHUk,666
23
+ lefx/effect_creation/studio/lab/clock.py,sha256=oOjESmydFx3HbHiL3tjRqKErcDuP4bABcitBLE9tDXs,2719
24
+ lefx/effect_creation/studio/lab/examples.py,sha256=LR0TarKefZN6sm6-J6K4XSl6aYmwlpitGOvYksKNgms,3799
25
+ lefx/effect_creation/studio/lab/inspector.py,sha256=EpXsh5SsMZC1zCeuFtr6aZZtgjUEEu5GXReDt_0CKxc,17319
26
+ lefx/effect_creation/studio/lab/output.py,sha256=EXMytqBJCWtMkw_2HGYJFIG7zQ68UnVVlyirW9iy9iY,8807
27
+ lefx/effect_creation/studio/lab/page.py,sha256=p6DCWUWXFGn1Gr-k3hUvjdzfrBb23m4YW5_KloWsUcM,39879
28
+ lefx/effect_creation/studio/lab/timeline.py,sha256=Tq93Yu-v45SwYbwft8kIdWz5KnOTveA00QPs2IVvp_g,10950
29
+ lefx/effect_creation/studio/lab/tree.py,sha256=KJLpByhtwBgj_30cJC27QV5zV3EalwyRa2mjMriY0WM,16364
30
+ lefx/effect_creation/visual/__init__.py,sha256=VMb_JvkpkGNTVKJTpuV8fdcCzvieMSPYDcC67j4hpLg,267
31
+ lefx/effect_creation/visual/blocks.py,sha256=VvIx9zMCfLCM6qEfWzmO2oRGyCcCoVLKqOSOtkn2hcY,4238
32
+ lefx/effect_creation/visual/compiler.py,sha256=cLLbX5XCPYflann9vNx1NNO2-m9YgSYNladyWmJaKy0,8623
33
+ lefx/effect_creation/visual/editor.py,sha256=_7EVRi3awDQfh1EcOMNWTitzysfus9Be6iRgKLgcNOM,8898
34
+ lefx/effect_creation/visual/kernel.py,sha256=bMk48gQK8XuCUUk-TY8EYWnNpo3JCi8a1uSFuxvY8DU,6263
35
+ lefx/effect_creation/visual/model.py,sha256=AXbDCahdMtbYiNkxPm8ZegPK1PrcctF6DNAdxIE9AJc,7850
36
+ lefx/effect_creation/visual/persistence.py,sha256=CfQ0m4QOxMnBaJ4gReYCByDcxoswTRmYf2wu-Sl5O20,4177
37
+ lefx/effect_creation/visual/preview.py,sha256=1w_f_JjIZ4rFEY8te7SOebnGA4YyZOqyI0Jc9j6_veI,4849
38
+ lefx/effect_creation/visual/steps.py,sha256=GWX-OovrDyIPAixSzafvrI0ImlCJanEaO2bagXt9rJA,6206
39
+ led_controller_version_3_effect_creation-3.0.4.dist-info/METADATA,sha256=0_EDFhVwRRI0NRm2SB84Ax9ELowUVwgN_J5Q6JiOSYA,6403
40
+ led_controller_version_3_effect_creation-3.0.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
41
+ led_controller_version_3_effect_creation-3.0.4.dist-info/entry_points.txt,sha256=zjp9tVEpldHtjQf-5koWd1wt1D5iRUet5U2JpVDl2w4,111
42
+ led_controller_version_3_effect_creation-3.0.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.33.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -58,6 +58,11 @@ def build_parser() -> argparse.ArgumentParser:
58
58
  "The way to find out whether a standalone build is complete."
59
59
  ),
60
60
  )
61
+ parser.add_argument(
62
+ "--gui-self-check",
63
+ action="store_true",
64
+ help="Open the Studio with null output, run the Qt event loop briefly and exit.",
65
+ )
61
66
  parser.add_argument("--verbose", action="store_true")
62
67
  return parser
63
68
 
@@ -84,8 +89,14 @@ def self_check(project: Project) -> int:
84
89
  if outputs == [NULL_OUTPUT]:
85
90
  print(" ! no device package reachable — entry point metadata is missing")
86
91
 
92
+ from lefx.interfaces.discovery import installed_effect_sets
93
+
94
+ sets = installed_effect_sets()
95
+ print(f"effect sets : {', '.join(sorted(sets))}")
87
96
  session = StudioSession(project=project)
88
97
  failures: list[str] = []
98
+ if under_a_frozen_build() and not {"core-set", "smartspeaker-set"} <= sets.keys():
99
+ failures.append("Frozen build is missing installed effect-set archives")
89
100
  try:
90
101
  session.open(NULL_OUTPUT)
91
102
  effects = session.registry.list_effects()
@@ -150,13 +161,18 @@ def main(argv: list[str] | None = None) -> int:
150
161
  search_paths=args.sources,
151
162
  project=project,
152
163
  )
153
- remember(project)
164
+ if not args.gui_self_check:
165
+ remember(project)
154
166
 
155
167
  application = QApplication(sys.argv[:1])
156
168
  application.setApplicationName("LEFX Studio")
157
- window = StudioWindow(session, initial_output=args.output)
169
+ window = StudioWindow(session, initial_output=NULL_OUTPUT if args.gui_self_check else args.output)
158
170
  window.setWindowTitle(f"LEFX Studio — {project.label}")
159
171
  window.show()
172
+ if args.gui_self_check:
173
+ from PySide6.QtCore import QTimer
174
+
175
+ QTimer.singleShot(1000, window.close)
160
176
  try:
161
177
  return int(application.exec())
162
178
  finally:
@@ -0,0 +1,12 @@
1
+ """Studio Lab: the experimental visual editor, as one tab of the studio.
2
+
3
+ Experimental on purpose. It is a place to try out how designing effects should
4
+ feel — layers, blocks, a timeline, stepping through states — on top of the
5
+ headless core in :mod:`lefx.effect_creation.visual`, which stays the only
6
+ owner of the document and the only thing that computes frames.
7
+
8
+ Split like the studio itself: ``clock`` and ``output`` carry no Qt and are
9
+ tested without a display; ``page``, ``tree``, ``inspector``, ``timeline`` and
10
+ ``ring`` draw. Each panel talks to the page through a few signals, so one can be
11
+ swapped for another experiment without touching the rest.
12
+ """
@@ -0,0 +1,83 @@
1
+ """Preview time that does not depend on how often anyone looks at it.
2
+
3
+ The timeline asks for "now" whenever it repaints, which is as often as the GUI
4
+ manages. The answer is computed from a monotonic clock and an anchor, never by
5
+ adding a frame interval, so a slow repaint shows a later moment rather than a
6
+ slower effect, and pausing, seeking or changing the speed costs no drift.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import time
12
+ from typing import Callable
13
+
14
+
15
+ class PreviewClock:
16
+ """Play, pause, stop and seek over ``[start, end]`` at a chosen speed."""
17
+
18
+ def __init__(
19
+ self, *, start: float = 0.0, end: float = 10.0, now: Callable[[], float] = time.monotonic
20
+ ) -> None:
21
+ self._now = now
22
+ self.start = float(start)
23
+ self.end = max(self.start + 0.001, float(end))
24
+ self.speed = 1.0
25
+ self.loop = True
26
+ self._position = self.start
27
+ self._anchor: float | None = None
28
+
29
+ @property
30
+ def playing(self) -> bool:
31
+ return self._anchor is not None
32
+
33
+ def elapsed(self) -> float:
34
+ """The preview time right now. Reaching the end loops or pauses there."""
35
+ if self._anchor is None:
36
+ return self._position
37
+ moment = self._now()
38
+ position = self._position + (moment - self._anchor) * self.speed
39
+ if position >= self.end:
40
+ if self.loop:
41
+ position = self.start + (position - self.start) % (self.end - self.start)
42
+ else:
43
+ position, moment = self.end, None
44
+ self._position, self._anchor = position, moment
45
+ return position
46
+
47
+ def play(self) -> None:
48
+ if self.playing:
49
+ return
50
+ if self._position >= self.end:
51
+ self._position = self.start
52
+ self._anchor = self._now()
53
+
54
+ def pause(self) -> None:
55
+ self._position = self.elapsed()
56
+ self._anchor = None
57
+
58
+ def toggle(self) -> None:
59
+ self.pause() if self.playing else self.play()
60
+
61
+ def stop(self) -> None:
62
+ self._anchor = None
63
+ self._position = self.start
64
+
65
+ def seek(self, position: float) -> None:
66
+ self._position = min(self.end, max(self.start, float(position)))
67
+ if self._anchor is not None:
68
+ self._anchor = self._now()
69
+
70
+ def set_speed(self, speed: float) -> None:
71
+ self._position = self.elapsed()
72
+ if self._anchor is not None:
73
+ self._anchor = self._now()
74
+ self.speed = max(0.01, float(speed))
75
+
76
+ def set_range(self, start: float, end: float) -> None:
77
+ position = self.elapsed()
78
+ self.start = max(0.0, float(start))
79
+ self.end = max(self.start + 0.001, float(end))
80
+ self.seek(position)
81
+
82
+
83
+ __all__ = ["PreviewClock"]
@@ -0,0 +1,88 @@
1
+ """Starting points for experiments, built with the editor's own operations.
2
+
3
+ Each one is one of the concept cases the Lab is meant to explore. They are
4
+ documents like any other: built through :class:`Editor` calls, validated by it,
5
+ and editable, savable and exportable once loaded. No Qt here.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from typing import Callable
11
+
12
+ from lefx.effect_creation.visual import Editor
13
+
14
+ TWELFTH = 1 / 12
15
+
16
+
17
+ def two_points_rotating() -> dict:
18
+ editor = Editor()
19
+ editor.metadata(id="zwei_punkte", title="Zwei Punkte, gemeinsame Rotation")
20
+ layer = editor.add_layer("Punkte")
21
+ editor.add_element(layer, "point", position=0.0, color="#FF5533")
22
+ editor.add_element(layer, "point", position=0.5, color="#3399FF")
23
+ editor.add_animation(layer, "rotation", rate=0.25)
24
+ return editor.document
25
+
26
+
27
+ def counter_rotating_segments() -> dict:
28
+ editor = Editor()
29
+ editor.metadata(id="gegenlaeufige_segmente", title="Gegenläufige Segmente")
30
+ first = editor.add_layer("Segment A")
31
+ editor.add_element(first, "segment", position=0.0, length=5 * TWELFTH, color="#FF3311")
32
+ editor.add_animation(first, "rotation", rate=0.25)
33
+ second = editor.add_layer("Segment B")
34
+ editor.configure_layer(second, blend="add")
35
+ editor.add_element(second, "segment", position=0.5, length=3 * TWELFTH, color="#1155FF")
36
+ editor.add_animation(second, "rotation", rate=0.25, reverse=True)
37
+ return editor.document
38
+
39
+
40
+ def alternating_pattern() -> dict:
41
+ """A/B over the whole ring, from six points — no pattern block exists yet."""
42
+ editor = Editor()
43
+ editor.metadata(id="ab_muster", title="A/B-Muster (aus Punkten)")
44
+ background = editor.add_layer("B-Farbe")
45
+ editor.add_element(background, "fill", color="#202060")
46
+ layer = editor.add_layer("A-Punkte")
47
+ for index in range(0, 12, 2):
48
+ editor.add_element(layer, "point", position=index * TWELFTH, color="#FFAA00")
49
+ editor.add_animation(layer, "rotation", rate=1 / 12)
50
+ return editor.document
51
+
52
+
53
+ def segment_with_colour_cycle() -> dict:
54
+ editor = Editor()
55
+ editor.metadata(id="segment_farbwechsel", title="Rotierendes Segment mit Farbwechsel")
56
+ layer = editor.add_layer("Segment")
57
+ editor.add_element(layer, "segment", length=5 * TWELFTH, color="#FF0000")
58
+ editor.add_animation(layer, "rotation", rate=0.2)
59
+ editor.add_animation(layer, "color_cycle", rate=0.5)
60
+ return editor.document
61
+
62
+
63
+ def overlapping_layers() -> dict:
64
+ editor = Editor()
65
+ editor.metadata(id="ueberlagerung", title="Überlagerung über einem Verlauf")
66
+ ground = editor.add_layer("Hintergrund")
67
+ editor.add_element(ground, "gradient", color="#001133", end_color="#003311", brightness=0.6)
68
+ sparks = editor.add_layer("Funkeln")
69
+ editor.configure_layer(sparks, blend="max")
70
+ editor.add_element(sparks, "fill", color="#FFFFFF", brightness=0.8)
71
+ editor.add_animation(sparks, "sparkle", frequency=4.0, density=0.2, seed=7)
72
+ pulse = editor.add_layer("Puls")
73
+ editor.configure_layer(pulse, blend="add")
74
+ editor.add_element(pulse, "segment", length=4 * TWELFTH, color="#AA00FF")
75
+ editor.add_animation(pulse, "pulse", frequency=0.5, minimum=-80.0, maximum=0.0)
76
+ editor.add_animation(pulse, "rotation", rate=0.1, reverse=True)
77
+ return editor.document
78
+
79
+
80
+ EXAMPLES: dict[str, tuple[str, Callable[[], dict]]] = {
81
+ "two_points": ("Zwei Punkte rotieren gemeinsam", two_points_rotating),
82
+ "counter_rotation": ("Zwei Segmente, gegenläufig auf zwei Ebenen", counter_rotating_segments),
83
+ "alternating": ("A/B-Muster über den ganzen Ring", alternating_pattern),
84
+ "colour_cycle": ("Rotierendes Segment mit Farbwechsel", segment_with_colour_cycle),
85
+ "overlap": ("Ebenen überlagern sich (Verlauf, Funkeln, Puls)", overlapping_layers),
86
+ }
87
+
88
+ __all__ = ["EXAMPLES"]