sourcepp 2025.2.20.dev1__tar.gz → 2025.5.18.dev1__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.
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/CMakeLists.txt +2 -2
- sourcepp-2025.2.20.dev1/README.md → sourcepp-2025.5.18.dev1/PKG-INFO +52 -8
- sourcepp-2025.2.20.dev1/PKG-INFO → sourcepp-2025.5.18.dev1/README.md +30 -31
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/pyproject.toml +1 -1
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/sourcepp/__init__.py +1 -1
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/vtfpp.h +19 -5
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/LICENSE +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/THIRDPARTY_LEGAL_NOTICES.txt +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/cfg/CMakeLists.txt +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/cfg/pyproject.toml +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/bsppp.h +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/gamepp.h +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/sourcepp.cpp +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/sourcepp.h +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/steampp.h +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/toolpp.h +0 -0
- {sourcepp-2025.2.20.dev1 → sourcepp-2025.5.18.dev1}/src/vcryptpp.h +0 -0
|
@@ -30,7 +30,7 @@ endif()
|
|
|
30
30
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
31
31
|
|
|
32
32
|
set(SOURCEPP_BUILD_PYTHON_WRAPPERS ON CACHE INTERNAL "" FORCE)
|
|
33
|
-
set(SOURCEPP_VERSION "2025.
|
|
33
|
+
set(SOURCEPP_VERSION "2025.05.18dev1")
|
|
34
34
|
|
|
35
35
|
# As weird as this looks, this is necessary for sdist wheel
|
|
36
36
|
set(SOURCEPP_PYTHON_IS_SUBDIR OFF)
|
|
@@ -41,6 +41,6 @@ else()
|
|
|
41
41
|
FetchContent_Declare(
|
|
42
42
|
sourcepp
|
|
43
43
|
GIT_REPOSITORY "https://github.com/craftablescience/sourcepp.git"
|
|
44
|
-
GIT_TAG "
|
|
44
|
+
GIT_TAG "3691a37d202221d43452039faa7ee9acc6106595")
|
|
45
45
|
FetchContent_MakeAvailable(sourcepp)
|
|
46
46
|
endif()
|
|
@@ -1,12 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: sourcepp
|
|
3
|
+
Version: 2025.5.18.dev1
|
|
4
|
+
Summary: Several modern C++20 libraries for sanely parsing Valve formats.
|
|
5
|
+
Author-Email: craftablescience <lauralewisdev@gmail.com>
|
|
6
|
+
Maintainer-Email: craftablescience <lauralewisdev@gmail.com>
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Project-URL: homepage, https://github.com/craftablescience/sourcepp
|
|
17
|
+
Project-URL: repository, https://github.com/craftablescience/sourcepp
|
|
18
|
+
Project-URL: issue tracker, https://github.com/craftablescience/sourcepp/issues
|
|
19
|
+
Project-URL: funding, https://ko-fi.com/craftablescience
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
1
23
|
<div>
|
|
2
24
|
<img align="left" width="101px" src="https://github.com/craftablescience/sourcepp/blob/main/branding/logo.png?raw=true" alt="The Source Pretty Parsers logo. A printer-esque device is scanning a page with hex codes and printing a picture of Cordon Freeman." />
|
|
3
25
|
<h1>Source Pretty Parsers</h1>
|
|
4
26
|
</div>
|
|
5
27
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
28
|
+
<div>
|
|
29
|
+
<a href="https://github.com/craftablescience/sourcepp/actions" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/actions/workflow/status/craftablescience/sourcepp/build.yml?label=Build&logo=github&logoColor=%23FFFFFF" alt="Build Status" /></a>
|
|
30
|
+
<a href="https://github.com/craftablescience/sourcepp/blob/main/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/license/craftablescience/sourcepp?label=License&logo=libreofficewriter&logoColor=%23FFFFFF" alt="License" /></a>
|
|
31
|
+
<a href="https://discord.gg/ASgHFkX" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/discord/678074864346857482?label=Discord&logo=Discord&logoColor=%23FFFFFF" alt="Discord" /></a>
|
|
32
|
+
<a href="https://ko-fi.com/craftablescience" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/donate-006dae?label=Ko-fi&logo=ko-fi" alt="Ko-Fi" /></a>
|
|
33
|
+
</div>
|
|
10
34
|
|
|
11
35
|
Several modern C++20 libraries for sanely parsing Valve formats, rolled into one big repository.
|
|
12
36
|
|
|
@@ -157,11 +181,11 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
157
181
|
</tr>
|
|
158
182
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
159
183
|
<tr>
|
|
160
|
-
<td rowspan="
|
|
184
|
+
<td rowspan="29"><code>vpkpp</code></td>
|
|
161
185
|
<td>007 v1.1, v1.3 (007 - Nightfire)</td>
|
|
162
186
|
<td align="center">✅</td>
|
|
163
187
|
<td align="center">❌</td>
|
|
164
|
-
<td rowspan="
|
|
188
|
+
<td rowspan="29" align="center">C<br>C#</td>
|
|
165
189
|
</tr>
|
|
166
190
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
167
191
|
<tr>
|
|
@@ -182,6 +206,12 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
182
206
|
<td align="center">✅</td>
|
|
183
207
|
</tr>
|
|
184
208
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
209
|
+
<tr>
|
|
210
|
+
<td>HOG (Descent)</td>
|
|
211
|
+
<td align="center">✅</td>
|
|
212
|
+
<td align="center">❌</td>
|
|
213
|
+
</tr>
|
|
214
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
185
215
|
<tr>
|
|
186
216
|
<td>OL (Worldcraft Object Library)</td>
|
|
187
217
|
<td align="center">✅</td>
|
|
@@ -225,12 +255,24 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
225
255
|
<td align="center">✅</td>
|
|
226
256
|
</tr>
|
|
227
257
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td>VPP v1-3 (Red Faction)</td>
|
|
260
|
+
<td align="center">✅</td>
|
|
261
|
+
<td align="center">❌</td>
|
|
262
|
+
</tr>
|
|
263
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
228
264
|
<tr>
|
|
229
265
|
<td>WAD v3</td>
|
|
230
266
|
<td align="center">✅</td>
|
|
231
267
|
<td align="center">✅</td>
|
|
232
268
|
</tr>
|
|
233
269
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
270
|
+
<tr>
|
|
271
|
+
<td>XZP v6 (Half-Life 2 for XBOX)</td>
|
|
272
|
+
<td align="center">✅</td>
|
|
273
|
+
<td align="center">❌</td>
|
|
274
|
+
</tr>
|
|
275
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
234
276
|
<tr>
|
|
235
277
|
<td>
|
|
236
278
|
ZIP, and some of its aliases:
|
|
@@ -250,7 +292,7 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
250
292
|
<td><a href="https://wiki.mozilla.org/APNG_Specification">APNG</a></td>
|
|
251
293
|
<td align="center">✅</td>
|
|
252
294
|
<td align="center">❌</td>
|
|
253
|
-
<td rowspan="31" align="center">Python</td>
|
|
295
|
+
<td rowspan="31" align="center">C<br>Python</td>
|
|
254
296
|
</tr>
|
|
255
297
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
256
298
|
<tr>
|
|
@@ -366,9 +408,11 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
366
408
|
- `bsppp` partial library redesign, lump compression and game lump parsing/writing support contributed by [@Tholp](https://github.com/Tholp1).
|
|
367
409
|
- `steampp` is based on the [SteamAppPathProvider](https://github.com/Trico-Everfire/SteamAppPathProvider) library by [@Trico Everfire](https://github.com/Trico-Everfire) and [Momentum Mod](https://momentum-mod.org) contributors.
|
|
368
410
|
- `vpkpp`'s 007 parser is based on [reverse-engineering work](https://raw.githubusercontent.com/SmileyAG/dumpster/refs/heads/src_jb007nightfirepc_alurazoe/file_format_analysis.txt) by Alhexx.
|
|
369
|
-
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/
|
|
411
|
+
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/eepycats) and [@ymgve](https://github.com/ymgve).
|
|
412
|
+
- `vpkpp`'s HOG parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
370
413
|
- `vpkpp`'s OL parser is based on [reverse-engineering work](https://github.com/erysdren/scratch/blob/main/kaitai/worldcraft_ol.ksy) by [@erysdren](https://github.com/erysdren).
|
|
371
414
|
- `vpkpp`'s ORE parser is based on [reverse-engineering work](https://github.com/erysdren/narbacular-drop-tools) by [@erysdren](https://github.com/erysdren).
|
|
415
|
+
- `vpkpp`'s VPP parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
372
416
|
- `vpkpp`'s WAD3 parser/writer was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
373
417
|
- `vtfpp`'s SHT parser/writer was contributed by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
374
418
|
- `vtfpp`'s VTF write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
@@ -1,35 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: sourcepp
|
|
3
|
-
Version: 2025.2.20.dev1
|
|
4
|
-
Summary: Several modern C++20 libraries for sanely parsing Valve formats.
|
|
5
|
-
Home-page: https://github.com/craftablescience/sourcepp
|
|
6
|
-
Author-Email: craftablescience <lauralewisdev@gmail.com>
|
|
7
|
-
Maintainer-Email: craftablescience <lauralewisdev@gmail.com>
|
|
8
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Project-URL: Homepage, https://github.com/craftablescience/sourcepp
|
|
18
|
-
Project-URL: Repository, https://github.com/craftablescience/sourcepp
|
|
19
|
-
Project-URL: Issue tracker, https://github.com/craftablescience/sourcepp/issues
|
|
20
|
-
Project-URL: Funding, https://ko-fi.com/craftablescience
|
|
21
|
-
Requires-Python: >=3.8
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
|
|
24
1
|
<div>
|
|
25
2
|
<img align="left" width="101px" src="https://github.com/craftablescience/sourcepp/blob/main/branding/logo.png?raw=true" alt="The Source Pretty Parsers logo. A printer-esque device is scanning a page with hex codes and printing a picture of Cordon Freeman." />
|
|
26
3
|
<h1>Source Pretty Parsers</h1>
|
|
27
4
|
</div>
|
|
28
5
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
6
|
+
<div>
|
|
7
|
+
<a href="https://github.com/craftablescience/sourcepp/actions" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/actions/workflow/status/craftablescience/sourcepp/build.yml?label=Build&logo=github&logoColor=%23FFFFFF" alt="Build Status" /></a>
|
|
8
|
+
<a href="https://github.com/craftablescience/sourcepp/blob/main/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/license/craftablescience/sourcepp?label=License&logo=libreofficewriter&logoColor=%23FFFFFF" alt="License" /></a>
|
|
9
|
+
<a href="https://discord.gg/ASgHFkX" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/discord/678074864346857482?label=Discord&logo=Discord&logoColor=%23FFFFFF" alt="Discord" /></a>
|
|
10
|
+
<a href="https://ko-fi.com/craftablescience" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/donate-006dae?label=Ko-fi&logo=ko-fi" alt="Ko-Fi" /></a>
|
|
11
|
+
</div>
|
|
33
12
|
|
|
34
13
|
Several modern C++20 libraries for sanely parsing Valve formats, rolled into one big repository.
|
|
35
14
|
|
|
@@ -180,11 +159,11 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
180
159
|
</tr>
|
|
181
160
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
182
161
|
<tr>
|
|
183
|
-
<td rowspan="
|
|
162
|
+
<td rowspan="29"><code>vpkpp</code></td>
|
|
184
163
|
<td>007 v1.1, v1.3 (007 - Nightfire)</td>
|
|
185
164
|
<td align="center">✅</td>
|
|
186
165
|
<td align="center">❌</td>
|
|
187
|
-
<td rowspan="
|
|
166
|
+
<td rowspan="29" align="center">C<br>C#</td>
|
|
188
167
|
</tr>
|
|
189
168
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
190
169
|
<tr>
|
|
@@ -205,6 +184,12 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
205
184
|
<td align="center">✅</td>
|
|
206
185
|
</tr>
|
|
207
186
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
187
|
+
<tr>
|
|
188
|
+
<td>HOG (Descent)</td>
|
|
189
|
+
<td align="center">✅</td>
|
|
190
|
+
<td align="center">❌</td>
|
|
191
|
+
</tr>
|
|
192
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
208
193
|
<tr>
|
|
209
194
|
<td>OL (Worldcraft Object Library)</td>
|
|
210
195
|
<td align="center">✅</td>
|
|
@@ -248,12 +233,24 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
248
233
|
<td align="center">✅</td>
|
|
249
234
|
</tr>
|
|
250
235
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
236
|
+
<tr>
|
|
237
|
+
<td>VPP v1-3 (Red Faction)</td>
|
|
238
|
+
<td align="center">✅</td>
|
|
239
|
+
<td align="center">❌</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
251
242
|
<tr>
|
|
252
243
|
<td>WAD v3</td>
|
|
253
244
|
<td align="center">✅</td>
|
|
254
245
|
<td align="center">✅</td>
|
|
255
246
|
</tr>
|
|
256
247
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
248
|
+
<tr>
|
|
249
|
+
<td>XZP v6 (Half-Life 2 for XBOX)</td>
|
|
250
|
+
<td align="center">✅</td>
|
|
251
|
+
<td align="center">❌</td>
|
|
252
|
+
</tr>
|
|
253
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
257
254
|
<tr>
|
|
258
255
|
<td>
|
|
259
256
|
ZIP, and some of its aliases:
|
|
@@ -273,7 +270,7 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
273
270
|
<td><a href="https://wiki.mozilla.org/APNG_Specification">APNG</a></td>
|
|
274
271
|
<td align="center">✅</td>
|
|
275
272
|
<td align="center">❌</td>
|
|
276
|
-
<td rowspan="31" align="center">Python</td>
|
|
273
|
+
<td rowspan="31" align="center">C<br>Python</td>
|
|
277
274
|
</tr>
|
|
278
275
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
279
276
|
<tr>
|
|
@@ -389,9 +386,11 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
389
386
|
- `bsppp` partial library redesign, lump compression and game lump parsing/writing support contributed by [@Tholp](https://github.com/Tholp1).
|
|
390
387
|
- `steampp` is based on the [SteamAppPathProvider](https://github.com/Trico-Everfire/SteamAppPathProvider) library by [@Trico Everfire](https://github.com/Trico-Everfire) and [Momentum Mod](https://momentum-mod.org) contributors.
|
|
391
388
|
- `vpkpp`'s 007 parser is based on [reverse-engineering work](https://raw.githubusercontent.com/SmileyAG/dumpster/refs/heads/src_jb007nightfirepc_alurazoe/file_format_analysis.txt) by Alhexx.
|
|
392
|
-
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/
|
|
389
|
+
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/eepycats) and [@ymgve](https://github.com/ymgve).
|
|
390
|
+
- `vpkpp`'s HOG parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
393
391
|
- `vpkpp`'s OL parser is based on [reverse-engineering work](https://github.com/erysdren/scratch/blob/main/kaitai/worldcraft_ol.ksy) by [@erysdren](https://github.com/erysdren).
|
|
394
392
|
- `vpkpp`'s ORE parser is based on [reverse-engineering work](https://github.com/erysdren/narbacular-drop-tools) by [@erysdren](https://github.com/erysdren).
|
|
393
|
+
- `vpkpp`'s VPP parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
395
394
|
- `vpkpp`'s WAD3 parser/writer was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
396
395
|
- `vtfpp`'s SHT parser/writer was contributed by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
397
396
|
- `vtfpp`'s VTF write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "sourcepp"
|
|
8
|
-
version = "2025.
|
|
8
|
+
version = "2025.05.18dev1"
|
|
9
9
|
authors = [{ name = "craftablescience", email = "lauralewisdev@gmail.com" }]
|
|
10
10
|
maintainers = [{ name = "craftablescience", email = "lauralewisdev@gmail.com" }]
|
|
11
11
|
description = "Several modern C++20 libraries for sanely parsing Valve formats."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from ._sourcepp_impl import __doc__, bsppp, gamepp, sourcepp, steampp, toolpp, vcryptpp, vtfpp
|
|
2
2
|
|
|
3
3
|
__author__ = "craftablescience"
|
|
4
|
-
__version__ = "2025.
|
|
4
|
+
__version__ = "2025.05.18dev1"
|
|
5
5
|
__all__ = ['__author__', '__doc__', '__version__', 'bsppp', 'gamepp', 'sourcepp', 'steampp', 'toolpp', 'vcryptpp', 'vtfpp']
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
#include <nanobind/stl/tuple.h>
|
|
9
9
|
#include <nanobind/stl/vector.h>
|
|
10
10
|
|
|
11
|
+
#include "../../../include/vtfpp/ImageConversion.h"
|
|
12
|
+
|
|
11
13
|
namespace py = nanobind;
|
|
12
14
|
|
|
13
15
|
#include <vtfpp/vtfpp.h>
|
|
@@ -82,7 +84,8 @@ void register_python(py::module_& m) {
|
|
|
82
84
|
.def("decimal", &decimal, py::arg("format"))
|
|
83
85
|
.def("compressed", &compressed, py::arg("format"))
|
|
84
86
|
.def("transparent", &transparent, py::arg("format"))
|
|
85
|
-
.def("opaque", &opaque, py::arg("format"))
|
|
87
|
+
.def("opaque", &opaque, py::arg("format"))
|
|
88
|
+
.def("console", &console, py::arg("format"));
|
|
86
89
|
|
|
87
90
|
ImageFormatDetails
|
|
88
91
|
.def("get_data_length", py::overload_cast<ImageFormat, uint16_t, uint16_t, uint16_t>(&getDataLength), py::arg("format"), py::arg("width"), py::arg("height"), py::arg("slice_count") = 1)
|
|
@@ -198,8 +201,17 @@ void register_python(py::module_& m) {
|
|
|
198
201
|
return py::bytes{d.data(), d.size()};
|
|
199
202
|
}, py::arg("image_data"), py::arg("format"), py::arg("width"), py::arg("new_width"), py::arg("x_offset"), py::arg("height"), py::arg("new_height"), py::arg("y_offset"));
|
|
200
203
|
|
|
204
|
+
ImageConversion.def("gamma_correct_image_data", [](const py::bytes& imageData, ImageFormat format, uint16_t width, uint16_t height, float gamma) {
|
|
205
|
+
const auto d = gammaCorrectImageData({reinterpret_cast<const std::byte*>(imageData.data()), imageData.size()}, format, width, height, gamma);
|
|
206
|
+
return py::bytes{d.data(), d.size()};
|
|
207
|
+
}, py::arg("image_data"), py::arg("format"), py::arg("width"), py::arg("height"), py::arg("gamma"));
|
|
208
|
+
|
|
209
|
+
ImageConversion.def("invert_green_channel_for_image_data", [](const py::bytes& imageData, ImageFormat format, uint16_t width, uint16_t height) {
|
|
210
|
+
const auto d = invertGreenChannelForImageData({reinterpret_cast<const std::byte*>(imageData.data()), imageData.size()}, format, width, height);
|
|
211
|
+
return py::bytes{d.data(), d.size()};
|
|
212
|
+
}, py::arg("image_data"), py::arg("format"), py::arg("width"), py::arg("height"));
|
|
213
|
+
|
|
201
214
|
// Skip extractChannelFromImageData, difficult to bind
|
|
202
|
-
// Skip applyChannelToImageData, difficult to bind
|
|
203
215
|
}
|
|
204
216
|
|
|
205
217
|
auto cPPL = py::class_<PPL>(vtfpp, "PPL");
|
|
@@ -212,14 +224,14 @@ void register_python(py::module_& m) {
|
|
|
212
224
|
});
|
|
213
225
|
|
|
214
226
|
cPPL
|
|
215
|
-
.def(py::init<uint32_t, ImageFormat, uint32_t>(), py::arg("
|
|
227
|
+
.def(py::init<uint32_t, ImageFormat, uint32_t>(), py::arg("model_checksum"), py::arg("format") = ImageFormat::RGB888, py::arg("version") = 0)
|
|
216
228
|
.def("__init__", [](PPL* self, const py::bytes& pplData) {
|
|
217
229
|
return new(self) PPL{{reinterpret_cast<const std::byte*>(pplData.data()), pplData.size()}};
|
|
218
230
|
}, py::arg("ppl_data"))
|
|
219
231
|
.def(py::init<const std::string&>(), py::arg("path"))
|
|
220
232
|
.def("__bool__", &PPL::operator bool, py::is_operator())
|
|
221
233
|
.def_prop_rw("version", &PPL::getVersion, &PPL::setVersion)
|
|
222
|
-
.def_prop_rw("
|
|
234
|
+
.def_prop_rw("model_checksum", &PPL::getModelChecksum, &PPL::setModelChecksum)
|
|
223
235
|
.def_prop_rw("format", &PPL::getFormat, &PPL::setFormat)
|
|
224
236
|
.def("has_image_for_lod", &PPL::hasImageForLOD, py::arg("lod"))
|
|
225
237
|
.def_prop_ro("image_lods", &PPL::getImageLODs)
|
|
@@ -421,7 +433,9 @@ void register_python(py::module_& m) {
|
|
|
421
433
|
.def_rw("compute_reflectivity", &VTF::CreationOptions::computeReflectivity)
|
|
422
434
|
.def_rw("compression_level", &VTF::CreationOptions::compressionLevel)
|
|
423
435
|
.def_rw("compression_method", &VTF::CreationOptions::compressionMethod)
|
|
424
|
-
.def_rw("bumpmap_scale", &VTF::CreationOptions::bumpMapScale)
|
|
436
|
+
.def_rw("bumpmap_scale", &VTF::CreationOptions::bumpMapScale)
|
|
437
|
+
.def_rw("gamma_correction", &VTF::CreationOptions::gammaCorrection)
|
|
438
|
+
.def_rw("invert_green_channel", &VTF::CreationOptions::invertGreenChannel);
|
|
425
439
|
|
|
426
440
|
cVTF
|
|
427
441
|
.def_ro_static("FLAG_MASK_AFTER_V7_3", &VTF::FLAG_MASK_AFTER_V7_3)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|