OpenRCT2-ObjectCommon 0.2.2__tar.gz → 0.2.3__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.
Files changed (31) hide show
  1. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/PKG-INFO +2 -2
  2. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/blender/props.py +22 -0
  3. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/pyproject.toml +2 -2
  4. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_blender_shared.py +8 -0
  5. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/.github/workflows/lint.yml +0 -0
  6. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/.github/workflows/publish.yml +0 -0
  7. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/.github/workflows/pytest.yml +0 -0
  8. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/.gitignore +0 -0
  9. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/.yamllint.yaml +0 -0
  10. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/LICENSE +0 -0
  11. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/README.md +0 -0
  12. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/__init__.py +0 -0
  13. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/blender/__init__.py +0 -0
  14. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/blender/lights.py +0 -0
  15. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/blender/mesh_extract.py +0 -0
  16. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/blender/modal.py +0 -0
  17. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/cli.py +0 -0
  18. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/config.py +0 -0
  19. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/objectjson.py +0 -0
  20. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/parkobj.py +0 -0
  21. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/placement.py +0 -0
  22. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/py.typed +0 -0
  23. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/openrct2_object_common/testing.py +0 -0
  24. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/scripts/ci/set_version.py +0 -0
  25. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/conftest.py +0 -0
  26. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_blender.py +0 -0
  27. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_cli.py +0 -0
  28. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_config.py +0 -0
  29. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_objectjson.py +0 -0
  30. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_parkobj.py +0 -0
  31. {openrct2_objectcommon-0.2.2 → openrct2_objectcommon-0.2.3}/tests/test_placement.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenRCT2-ObjectCommon
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Shared config, CLI, .parkobj, and object.json scaffolding for OpenRCT2 object generators.
5
5
  Project-URL: Homepage, https://github.com/alex-parisi/OpenRCT2-ObjectCommon
6
6
  Project-URL: Repository, https://github.com/alex-parisi/OpenRCT2-ObjectCommon
@@ -9,7 +9,7 @@ License-Expression: GPL-3.0-or-later
9
9
  License-File: LICENSE
10
10
  Requires-Python: >=3.11
11
11
  Requires-Dist: numpy>=1.26
12
- Requires-Dist: openrct2-x7-renderer>=0.3.7
12
+ Requires-Dist: openrct2-x7-renderer>=0.3.8
13
13
  Requires-Dist: pillow>=10.0
14
14
  Requires-Dist: pyyaml>=6.0
15
15
  Provides-Extra: blender
@@ -46,6 +46,28 @@ def scale_preset_update(self, _context):
46
46
  self.units_per_tile = value
47
47
 
48
48
 
49
+ # Palette dithering modes. Identifiers match the strings the renderer's
50
+ # ``Context`` / ``make_context`` accept. Floyd–Steinberg is the historical
51
+ # default (highest fidelity); Bayer is screen-anchored so its pattern stays
52
+ # stable across an animation's frames, avoiding the per-frame "swimming" of
53
+ # error diffusion.
54
+ DITHER_MODE_ITEMS = [
55
+ (
56
+ "floyd_steinberg",
57
+ "Floyd–Steinberg",
58
+ "Highest fidelity, but the dither pattern shifts between animation frames",
59
+ ),
60
+ (
61
+ "bayer",
62
+ "Bayer (frame-stable)",
63
+ "Ordered dither locked to screen position; stable across animation frames",
64
+ ),
65
+ ("none", "None", "No dithering; flat palette quantisation"),
66
+ ]
67
+
68
+ DEFAULT_DITHER_MODE = "floyd_steinberg"
69
+
70
+
49
71
  LIGHT_TYPE_ITEMS = [
50
72
  ("diffuse", "Diffuse", "Directional diffuse light"),
51
73
  ("specular", "Specular", "Specular highlight light"),
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "OpenRCT2-ObjectCommon"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "Shared config, CLI, .parkobj, and object.json scaffolding for OpenRCT2 object generators."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -9,7 +9,7 @@ authors = [
9
9
  { name = "Alex Parisi", email = "alex@atparisi.com" }
10
10
  ]
11
11
  dependencies = [
12
- "openrct2-x7-renderer>=0.3.7",
12
+ "openrct2-x7-renderer>=0.3.8",
13
13
  "numpy>=1.26",
14
14
  "pillow>=10.0",
15
15
  "pyyaml>=6.0",
@@ -47,6 +47,14 @@ def test_shared_light_propertygroup_defined():
47
47
  )
48
48
 
49
49
 
50
+ def test_dither_mode_items_match_renderer_modes():
51
+ # The add-on enum identifiers must be exactly the strings make_context /
52
+ # Context accept, and the default must be one of them.
53
+ ids = {ident for ident, _label, _desc in props.DITHER_MODE_ITEMS}
54
+ assert ids == {"none", "floyd_steinberg", "bayer"}
55
+ assert props.DEFAULT_DITHER_MODE in ids
56
+
57
+
50
58
  # ===========================================================================
51
59
  # mesh_extract.base_color
52
60
  # ===========================================================================