notso-glb 0.1.0__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.
- notso_glb/__init__.py +38 -0
- notso_glb/__main__.py +6 -0
- notso_glb/analyzers/__init__.py +20 -0
- notso_glb/analyzers/bloat.py +117 -0
- notso_glb/analyzers/bones.py +100 -0
- notso_glb/analyzers/duplicates.py +71 -0
- notso_glb/analyzers/skinned_mesh.py +47 -0
- notso_glb/analyzers/uv_maps.py +59 -0
- notso_glb/cleaners/__init__.py +23 -0
- notso_glb/cleaners/bones.py +49 -0
- notso_glb/cleaners/duplicates.py +110 -0
- notso_glb/cleaners/mesh.py +183 -0
- notso_glb/cleaners/textures.py +116 -0
- notso_glb/cleaners/uv_maps.py +29 -0
- notso_glb/cleaners/vertex_groups.py +34 -0
- notso_glb/cli.py +330 -0
- notso_glb/exporters/__init__.py +8 -0
- notso_glb/exporters/gltf.py +647 -0
- notso_glb/utils/__init__.py +20 -0
- notso_glb/utils/blender.py +49 -0
- notso_glb/utils/constants.py +41 -0
- notso_glb/utils/gltfpack.py +273 -0
- notso_glb/utils/logging.py +421 -0
- notso_glb/utils/naming.py +24 -0
- notso_glb/wasm/__init__.py +32 -0
- notso_glb/wasm/constants.py +8 -0
- notso_glb/wasm/gltfpack.version +1 -0
- notso_glb/wasm/gltfpack.wasm +0 -0
- notso_glb/wasm/py.typed +0 -0
- notso_glb/wasm/runner.py +137 -0
- notso_glb/wasm/runtime.py +244 -0
- notso_glb/wasm/wasi.py +347 -0
- notso_glb-0.1.0.dist-info/METADATA +150 -0
- notso_glb-0.1.0.dist-info/RECORD +36 -0
- notso_glb-0.1.0.dist-info/WHEEL +4 -0
- notso_glb-0.1.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: notso-glb
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: GLB Export Optimizer for Mascot Models
|
|
5
|
+
Keywords: 3d,blender,compression,draco,glb,gltf,mascot,optimization,webgl
|
|
6
|
+
Author: Kaj Kowalski
|
|
7
|
+
Author-email: Kaj Kowalski <info@kajkowalski.nl>
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
16
|
+
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
|
|
17
|
+
Requires-Dist: bpy>=5,<6 ; python_full_version == '3.11.*'
|
|
18
|
+
Requires-Dist: rich>=14.2.0
|
|
19
|
+
Requires-Dist: typer>=0.20.1
|
|
20
|
+
Requires-Dist: wasmtime>=41.0.0
|
|
21
|
+
Requires-Python: ~=3.11.0
|
|
22
|
+
Project-URL: Homepage, https://github.com/kjanat/notso-glb
|
|
23
|
+
Project-URL: Issues, https://github.com/kjanat/notso-glb/issues
|
|
24
|
+
Project-URL: Repository, https://github.com/kjanat/notso-glb.git
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# GLB Export Optimizer for Mascot Models
|
|
28
|
+
|
|
29
|
+
> Cleans up Blender files and exports optimized GLB for web delivery.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
uvx notso-glb [OPTIONS] FILE
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="https://github.com/kjanat/notso-glb/blob/master/CLI.md" target="_blank" rel="noopener" title="View CLI Options">
|
|
37
|
+
<img alt="Screenshot with cli options" width="100%" src="https://raw.githubusercontent.com/kjanat/notso-glb/refs/heads/master/screenshot.webp">
|
|
38
|
+
</a>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<p align="center">
|
|
42
|
+
<a href="https://pypi.org/project/notso-glb/"><img src="https://img.shields.io/pypi/v/notso-glb" alt="PyPI"></a>
|
|
43
|
+
<a href="https://pypi.org/project/notso-glb/"><img src="https://img.shields.io/pypi/dm/notso-glb" alt="Downloads"></a> <!--<a href="https://github.com/kjanat/notso-glb/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/kjanat/notso-glb/ci.yml?branch=master" alt="CI"></a>-->
|
|
44
|
+
<a href="https://github.com/kjanat/notso-glb/blob/master/LICENSE"><img src="https://img.shields.io/github/license/kjanat/notso-glb" alt="License"></a> <!--<a href="https://notso-glb.kjanat.com"><img src="https://img.shields.io/badge/docs-mkdocs-blue" alt="Docs"></a>-->
|
|
45
|
+
<img src="https://img.shields.io/badge/python-3.11-blue" alt="Python 3.11">
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uv tool install notso-glb
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Or install directly from GitHub:
|
|
56
|
+
uv tool install -p3.11 git+https://github.com/kjanat/notso-glb
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
then just run `notso-glb` from the command line.
|
|
60
|
+
|
|
61
|
+
### Upgrade
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv tool upgrade notso-glb
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
Optimizations:
|
|
70
|
+
|
|
71
|
+
- Detects bloated props (high-vert non-skinned meshes, repetitive geometry)
|
|
72
|
+
- Detects skinned meshes with non-root parents (glTF spec issue)
|
|
73
|
+
- Detects unused UV maps (`TEXCOORD` bloat)
|
|
74
|
+
- Detects duplicate names and sanitization collisions
|
|
75
|
+
- Removes unused vertex groups (bone weight bloat)
|
|
76
|
+
- Marks static bones as non-deform (animation bloat)
|
|
77
|
+
- Removes bone shape objects (Icosphere artifacts)
|
|
78
|
+
- Resizes textures to max 1024px (optional `POT` enforcement)
|
|
79
|
+
- Exports with Draco mesh compression
|
|
80
|
+
- Exports with WebP textures
|
|
81
|
+
|
|
82
|
+
Bloat Detection:
|
|
83
|
+
|
|
84
|
+
- CRITICAL: Props >2000 verts, repetitive detail (many islands with high verts)
|
|
85
|
+
- WARNING: Props >1000 verts, scene total >15000 verts, non-root skinned meshes
|
|
86
|
+
|
|
87
|
+
Experimental Auto-fix (`--autofix`):
|
|
88
|
+
|
|
89
|
+
- BMesh cleanup (remove doubles, degenerate geometry, loose verts)
|
|
90
|
+
- Decimate bloated props to ~1600 verts
|
|
91
|
+
- Auto-rename duplicate objects/meshes/materials/actions (using pointer ID)
|
|
92
|
+
- Remove unused UV maps
|
|
93
|
+
|
|
94
|
+
## Usage
|
|
95
|
+
|
|
96
|
+
See [CLI.md]
|
|
97
|
+
|
|
98
|
+
## Requirements
|
|
99
|
+
|
|
100
|
+
- Blender 5.0+
|
|
101
|
+
- Python 3.11 (same as bundled with Blender)
|
|
102
|
+
- uv (optional, for easy install/upgrade)
|
|
103
|
+
- gltfpack (optional, for extra compression - WASM fallback included)
|
|
104
|
+
|
|
105
|
+
## Development Setup
|
|
106
|
+
|
|
107
|
+
For local development, download the gltfpack WASM binary:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Download latest WASM from npm
|
|
111
|
+
uv run scripts/update_wasm.py
|
|
112
|
+
|
|
113
|
+
# Or check current version
|
|
114
|
+
uv run scripts/update_wasm.py --show-version
|
|
115
|
+
|
|
116
|
+
# Download specific version
|
|
117
|
+
uv run scripts/update_wasm.py --version 1.0.0
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The WASM binary (`src/notso_glb/wasm/gltfpack.wasm`) is not committed to git and
|
|
121
|
+
must be downloaded locally. CI/CD pipelines handle this automatically.
|
|
122
|
+
|
|
123
|
+
## Useful Links
|
|
124
|
+
|
|
125
|
+
- [glTF 2.0 Specification]
|
|
126
|
+
- [glTF 2.0 API Reference Guide]
|
|
127
|
+
- [Khronos Resources]
|
|
128
|
+
- [Blender 5.0 glTF 2.0]
|
|
129
|
+
- [Blender 5.0 Python API Documentation]
|
|
130
|
+
- [Blender 5.0 Reference Manual]
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
This project is licensed under the GNU General Public License v3.0 - see the
|
|
135
|
+
[LICENSE] file for details.
|
|
136
|
+
|
|
137
|
+
This project uses [Blender] as a Python module (bpy), which is also GPL-3.0
|
|
138
|
+
licensed.
|
|
139
|
+
|
|
140
|
+
[Khronos Resources]: https://github.khronos.org/
|
|
141
|
+
[glTF 2.0 Specification]: https://www.khronos.org/gltf/#gltf-spec
|
|
142
|
+
[glTF 2.0 API Reference Guide]: https://www.khronos.org/files/gltf20-reference-guide.pdf
|
|
143
|
+
[Blender 5.0 Reference Manual]: https://docs.blender.org/manual/en/latest
|
|
144
|
+
[Blender 5.0 glTF 2.0]: https://docs.blender.org/manual/en/5.0/addons/import_export/scene_gltf2.html
|
|
145
|
+
[Blender 5.0 Python API Documentation]: https://docs.blender.org/api/current/index.html
|
|
146
|
+
[Blender]: https://www.blender.org/
|
|
147
|
+
[CLI.md]: https://github.com/kjanat/notso-glb/blob/master/CLI.md
|
|
148
|
+
[LICENSE]: https://github.com/kjanat/notso-glb/blob/master/LICENSE
|
|
149
|
+
|
|
150
|
+
<!-- markdownlint-disable-file MD033 -->
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
notso_glb/__init__.py,sha256=wlZgQgpB-stUEc5VFq4C_pbnnSvOck5hr-hanytRbhw,1139
|
|
2
|
+
notso_glb/__main__.py,sha256=quXpLTD85lDSE5G3diUB5s4ZX2FWEzmB6LombcP_r3g,115
|
|
3
|
+
notso_glb/analyzers/__init__.py,sha256=GxoWKtHe-ChOfNY_iRRh-BHxKSYUeF4zbsT0yD0B0GI,678
|
|
4
|
+
notso_glb/analyzers/bloat.py,sha256=l_5YEHtm3RC4FMIDaxeZN1U_bHqDvoqSxvgFp7UFF2I,3810
|
|
5
|
+
notso_glb/analyzers/bones.py,sha256=nBjx4W7NxUEQdAIzimkFsMQWU_qk7QRBr3T8b0vtrmY,3372
|
|
6
|
+
notso_glb/analyzers/duplicates.py,sha256=-mAlgwiGbArD3Y0PC_WUSgV_8f0S-joUCv1QdeqrJus,2437
|
|
7
|
+
notso_glb/analyzers/skinned_mesh.py,sha256=iXXUcID-LSluK20R5Gl5S8KpKi1ui_rIJNUpQoKFCFo,1515
|
|
8
|
+
notso_glb/analyzers/uv_maps.py,sha256=oaBgh_OqbcP6T5z_JFGhHwkti51WLX-BqTP7AiItLAk,1869
|
|
9
|
+
notso_glb/cleaners/__init__.py,sha256=EWtJQXmivkqv4h7J46kOEaQk1zlLQrPDHKoyGOLs5FU,767
|
|
10
|
+
notso_glb/cleaners/bones.py,sha256=NnowR9fyQy7VVrwr98x0GeB3mbzJX4OhC9vi3rJw1Cc,1468
|
|
11
|
+
notso_glb/cleaners/duplicates.py,sha256=RgpoSqEkioKp4dAQVmFv0oIadLTMaZJgP8feuBZy5Ao,3307
|
|
12
|
+
notso_glb/cleaners/mesh.py,sha256=bD3Z7ubf1HD2DPupdRzj7W30sl6i-zcpln53kZNozwM,5946
|
|
13
|
+
notso_glb/cleaners/textures.py,sha256=HHeufOMDg_tj9SHFGjr-mHrSv4ejou6WbKEP5BVZbVY,3140
|
|
14
|
+
notso_glb/cleaners/uv_maps.py,sha256=oqDxQjFH0hADqwIQ1FgCOZ0D-nWBFuEkjQ62rm2DoaA,819
|
|
15
|
+
notso_glb/cleaners/vertex_groups.py,sha256=wlLdV-kCr3s6y90JbTARQvEDyrOvIRiL6KusWz1-uVM,887
|
|
16
|
+
notso_glb/cli.py,sha256=Qa4QAArRNKz_ZjPxpPK82KtyVcm756ZFN0StW50rPmM,11430
|
|
17
|
+
notso_glb/exporters/__init__.py,sha256=P9FYVID1CmUFt7ZYuB_cXP5-bF4D9Ry0OIVpq7nvjB0,165
|
|
18
|
+
notso_glb/exporters/gltf.py,sha256=A9EpXqgDKMEjF7oGNZdDPhp2zMfgFGRpgkK2Zf77lnY,22951
|
|
19
|
+
notso_glb/utils/__init__.py,sha256=eci6g39oZWaRm7EJpuhc4bknamY8_EHzwLvKYGYIW-Q,423
|
|
20
|
+
notso_glb/utils/blender.py,sha256=60TXWvKCM6K7r6qSRE6z97n3z7KO5n5mTY1LhfmpTLY,1432
|
|
21
|
+
notso_glb/utils/constants.py,sha256=yTuUF4FxqNHG9t00vMj1FtLtoTqw55oGT9ZmNMg3_tM,1452
|
|
22
|
+
notso_glb/utils/gltfpack.py,sha256=2kgmQG71JoDToRwbGaCrE3viQbB0zSi45ISFbjehW0M,8343
|
|
23
|
+
notso_glb/utils/logging.py,sha256=Z8LCe0Pt6vALAtpRg-VnzIUYqELFUTL_ifRy7Oau0CQ,11908
|
|
24
|
+
notso_glb/utils/naming.py,sha256=ng7Jx6tXJPsYgDMZKgcwr7ZboTz1SvbJQXVii5xjJtc,669
|
|
25
|
+
notso_glb/wasm/__init__.py,sha256=KGUHFCnP_eQFgwEyHUpJMP9JF-TMh7dE-ueXCLEQ3dI,720
|
|
26
|
+
notso_glb/wasm/constants.py,sha256=Su3qEE3uxHYVJ3JhsGBW3wU5bA4FAC9j8rZQ8GgoElQ,163
|
|
27
|
+
notso_glb/wasm/gltfpack.version,sha256=WYVJhIUxBN9cNT4vaBoV_HkkdC-aLkaMKa8kjc5FzgM,6
|
|
28
|
+
notso_glb/wasm/gltfpack.wasm,sha256=QAedo3M_6rZNJsfyraI_08RtAHsnShaz7bsuZ1l16R4,314093
|
|
29
|
+
notso_glb/wasm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
notso_glb/wasm/runner.py,sha256=6GTWk0JPlaqi_ggIcwtHfGdWX7hGOA7Z4q7yuVFtjgA,4150
|
|
31
|
+
notso_glb/wasm/runtime.py,sha256=RyQ7VTdE3n8edDa3PC_JfXaA9PNsjDkAhllutTBCBAY,7160
|
|
32
|
+
notso_glb/wasm/wasi.py,sha256=PHq0wMsTZbxmlznt-RTWfL-NB2p1lRMlaUc1NQoMtOU,12023
|
|
33
|
+
notso_glb-0.1.0.dist-info/WHEEL,sha256=5DEXXimM34_d4Gx1AuF9ysMr1_maoEtGKjaILM3s4w4,80
|
|
34
|
+
notso_glb-0.1.0.dist-info/entry_points.txt,sha256=W9U3aSH3ks2M_d5WEBTOKwCUPWQKbPELi2C5GgeENwQ,46
|
|
35
|
+
notso_glb-0.1.0.dist-info/METADATA,sha256=_vsaPMbl95ZNdexudvrnXmBN-USWvgzgoTB0L-q0eUs,5380
|
|
36
|
+
notso_glb-0.1.0.dist-info/RECORD,,
|