sourcepp 2025.5.25.dev1__tar.gz → 2025.6.20.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.5.25.dev1 → sourcepp-2025.6.20.dev1}/CMakeLists.txt +2 -2
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/PKG-INFO +11 -4
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/README.md +10 -3
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/THIRDPARTY_LEGAL_NOTICES.txt +33 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/pyproject.toml +1 -1
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/sourcepp/__init__.py +1 -1
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/vtfpp.h +60 -35
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/LICENSE +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/cfg/CMakeLists.txt +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/cfg/pyproject.toml +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/bsppp.h +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/gamepp.h +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/sourcepp.cpp +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/sourcepp.h +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/steampp.h +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.dev1}/src/toolpp.h +0 -0
- {sourcepp-2025.5.25.dev1 → sourcepp-2025.6.20.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.06.20dev1")
|
|
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 "118d47e1fe801461307a2ec4eb1de116e1c4e381")
|
|
45
45
|
FetchContent_MakeAvailable(sourcepp)
|
|
46
46
|
endif()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sourcepp
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.6.20.dev1
|
|
4
4
|
Summary: Several modern C++20 libraries for sanely parsing Valve formats.
|
|
5
5
|
Author-Email: craftablescience <lauralewisdev@gmail.com>
|
|
6
6
|
Maintainer-Email: craftablescience <lauralewisdev@gmail.com>
|
|
@@ -21,7 +21,7 @@ Requires-Python: >=3.8
|
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
|
|
23
23
|
<div>
|
|
24
|
-
<img align="left" width="
|
|
24
|
+
<img align="left" width="148px" 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." />
|
|
25
25
|
<h1>Source Pretty Parsers</h1>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -288,11 +288,11 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
288
288
|
</tr>
|
|
289
289
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
290
290
|
<tr>
|
|
291
|
-
<td rowspan="
|
|
291
|
+
<td rowspan="35"><code>vtfpp</code></td>
|
|
292
292
|
<td><a href="https://wiki.mozilla.org/APNG_Specification">APNG</a></td>
|
|
293
293
|
<td align="center">✅</td>
|
|
294
294
|
<td align="center">❌</td>
|
|
295
|
-
<td rowspan="
|
|
295
|
+
<td rowspan="35" align="center">C<br>Python</td>
|
|
296
296
|
</tr>
|
|
297
297
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
298
298
|
<tr>
|
|
@@ -396,6 +396,12 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
396
396
|
<td align="center">✅</td>
|
|
397
397
|
<td align="center">✅</td>
|
|
398
398
|
</tr>
|
|
399
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
400
|
+
<tr>
|
|
401
|
+
<td><a href="https://developers.google.com/speed/webp">WebP</a></td>
|
|
402
|
+
<td align="center">✅</td>
|
|
403
|
+
<td align="center">✅</td>
|
|
404
|
+
</tr>
|
|
399
405
|
</table>
|
|
400
406
|
|
|
401
407
|
(\*) These libraries are incomplete and still in development. Their interfaces are unstable and will likely change in the future.
|
|
@@ -420,6 +426,7 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
420
426
|
- `vpkpp`'s ORE parser is based on [reverse-engineering work](https://github.com/erysdren/narbacular-drop-tools) by [@erysdren](https://github.com/erysdren).
|
|
421
427
|
- `vpkpp`'s VPP parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
422
428
|
- `vpkpp`'s WAD3 parser/writer was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
429
|
+
- `vtfpp`'s NICE/Lanczos-3 resize filter support was contributed by [@koerismo](https://github.com/koerismo).
|
|
423
430
|
- `vtfpp`'s SHT parser/writer was contributed by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
424
431
|
- `vtfpp`'s VTF write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
425
432
|
- `vtfpp`'s HDRI to cubemap conversion code is modified from the [HdriToCubemap](https://github.com/ivarout/HdriToCubemap) library by [@ivarout](https://github.com/ivarout).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div>
|
|
2
|
-
<img align="left" width="
|
|
2
|
+
<img align="left" width="148px" 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
3
|
<h1>Source Pretty Parsers</h1>
|
|
4
4
|
</div>
|
|
5
5
|
|
|
@@ -266,11 +266,11 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
266
266
|
</tr>
|
|
267
267
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
268
268
|
<tr>
|
|
269
|
-
<td rowspan="
|
|
269
|
+
<td rowspan="35"><code>vtfpp</code></td>
|
|
270
270
|
<td><a href="https://wiki.mozilla.org/APNG_Specification">APNG</a></td>
|
|
271
271
|
<td align="center">✅</td>
|
|
272
272
|
<td align="center">❌</td>
|
|
273
|
-
<td rowspan="
|
|
273
|
+
<td rowspan="35" align="center">C<br>Python</td>
|
|
274
274
|
</tr>
|
|
275
275
|
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
276
276
|
<tr>
|
|
@@ -374,6 +374,12 @@ Several modern C++20 libraries for sanely parsing Valve formats, rolled into one
|
|
|
374
374
|
<td align="center">✅</td>
|
|
375
375
|
<td align="center">✅</td>
|
|
376
376
|
</tr>
|
|
377
|
+
<tr><!-- empty row to disable github striped bg color --></tr>
|
|
378
|
+
<tr>
|
|
379
|
+
<td><a href="https://developers.google.com/speed/webp">WebP</a></td>
|
|
380
|
+
<td align="center">✅</td>
|
|
381
|
+
<td align="center">✅</td>
|
|
382
|
+
</tr>
|
|
377
383
|
</table>
|
|
378
384
|
|
|
379
385
|
(\*) These libraries are incomplete and still in development. Their interfaces are unstable and will likely change in the future.
|
|
@@ -398,6 +404,7 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
398
404
|
- `vpkpp`'s ORE parser is based on [reverse-engineering work](https://github.com/erysdren/narbacular-drop-tools) by [@erysdren](https://github.com/erysdren).
|
|
399
405
|
- `vpkpp`'s VPP parser was contributed by [@erysdren](https://github.com/erysdren).
|
|
400
406
|
- `vpkpp`'s WAD3 parser/writer was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
407
|
+
- `vtfpp`'s NICE/Lanczos-3 resize filter support was contributed by [@koerismo](https://github.com/koerismo).
|
|
401
408
|
- `vtfpp`'s SHT parser/writer was contributed by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
402
409
|
- `vtfpp`'s VTF write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
403
410
|
- `vtfpp`'s HDRI to cubemap conversion code is modified from the [HdriToCubemap](https://github.com/ivarout/HdriToCubemap) library by [@ivarout](https://github.com/ivarout).
|
|
@@ -169,6 +169,39 @@ NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
169
169
|
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
170
170
|
|
|
171
171
|
|
|
172
|
+
--------------- libwebp ---------------
|
|
173
|
+
|
|
174
|
+
Copyright (c) 2010, Google Inc. All rights reserved.
|
|
175
|
+
|
|
176
|
+
Redistribution and use in source and binary forms, with or without
|
|
177
|
+
modification, are permitted provided that the following conditions are
|
|
178
|
+
met:
|
|
179
|
+
|
|
180
|
+
* Redistributions of source code must retain the above copyright
|
|
181
|
+
notice, this list of conditions and the following disclaimer.
|
|
182
|
+
|
|
183
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
184
|
+
notice, this list of conditions and the following disclaimer in
|
|
185
|
+
the documentation and/or other materials provided with the
|
|
186
|
+
distribution.
|
|
187
|
+
|
|
188
|
+
* Neither the name of Google nor the names of its contributors may
|
|
189
|
+
be used to endorse or promote products derived from this software
|
|
190
|
+
without specific prior written permission.
|
|
191
|
+
|
|
192
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
193
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
194
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
195
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
196
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
197
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
198
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
199
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
200
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
201
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
202
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
203
|
+
|
|
204
|
+
|
|
172
205
|
--------------- OpenEXR ---------------
|
|
173
206
|
|
|
174
207
|
Copyright (c) 2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC.
|
|
@@ -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.06.20dev1"
|
|
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.06.20dev1"
|
|
5
5
|
__all__ = ['__author__', '__doc__', '__version__', 'bsppp', 'gamepp', 'sourcepp', 'steampp', 'toolpp', 'vcryptpp', 'vtfpp']
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
#include <nanobind/stl/tuple.h>
|
|
9
9
|
#include <nanobind/stl/vector.h>
|
|
10
10
|
|
|
11
|
-
#include "../../../include/vtfpp/ImageConversion.h"
|
|
12
|
-
|
|
13
11
|
namespace py = nanobind;
|
|
14
12
|
|
|
15
13
|
#include <vtfpp/vtfpp.h>
|
|
@@ -136,6 +134,7 @@ void register_python(py::module_& m) {
|
|
|
136
134
|
.value("JPG", FileFormat::JPG)
|
|
137
135
|
.value("BMP", FileFormat::BMP)
|
|
138
136
|
.value("TGA", FileFormat::TGA)
|
|
137
|
+
.value("WEBP", FileFormat::WEBP)
|
|
139
138
|
.value("QOI", FileFormat::QOI)
|
|
140
139
|
.value("HDR", FileFormat::HDR)
|
|
141
140
|
.value("EXR", FileFormat::EXR)
|
|
@@ -171,6 +170,7 @@ void register_python(py::module_& m) {
|
|
|
171
170
|
.value("MITCHELL", ResizeFilter::MITCHELL)
|
|
172
171
|
.value("POINT_SAMPLE", ResizeFilter::POINT_SAMPLE)
|
|
173
172
|
.value("KAISER", ResizeFilter::KAISER)
|
|
173
|
+
.value("NICE", ResizeFilter::NICE)
|
|
174
174
|
.export_values();
|
|
175
175
|
|
|
176
176
|
py::enum_<ResizeMethod>(ImageConversion, "ResizeMethod")
|
|
@@ -368,19 +368,17 @@ void register_python(py::module_& m) {
|
|
|
368
368
|
.def("get_data_as_aux_compression_method", &Resource::getDataAsAuxCompressionMethod)
|
|
369
369
|
.def("get_data_as_aux_compression_length", &Resource::getDataAsAuxCompressionLength, py::arg("mip"), py::arg("mip_count"), py::arg("frame"), py::arg("frame_count"), py::arg("face"), py::arg("face_count"));
|
|
370
370
|
|
|
371
|
-
py::enum_<VTF::
|
|
372
|
-
.value("NONE", VTF::FLAG_NONE)
|
|
371
|
+
py::enum_<VTF::FlagsV0>(cVTF, "FlagsV0", py::is_flag())
|
|
373
372
|
.value("POINT_SAMPLE", VTF::FLAG_POINT_SAMPLE)
|
|
374
373
|
.value("TRILINEAR", VTF::FLAG_TRILINEAR)
|
|
375
374
|
.value("CLAMP_S", VTF::FLAG_CLAMP_S)
|
|
376
375
|
.value("CLAMP_T", VTF::FLAG_CLAMP_T)
|
|
377
376
|
.value("ANISOTROPIC", VTF::FLAG_ANISOTROPIC)
|
|
378
377
|
.value("HINT_DXT5", VTF::FLAG_HINT_DXT5)
|
|
379
|
-
.value("PWL_CORRECTED", VTF::FLAG_PWL_CORRECTED)
|
|
380
378
|
.value("NORMAL", VTF::FLAG_NORMAL)
|
|
381
379
|
.value("NO_MIP", VTF::FLAG_NO_MIP)
|
|
382
380
|
.value("NO_LOD", VTF::FLAG_NO_LOD)
|
|
383
|
-
.value("
|
|
381
|
+
.value("MIN_MIP", VTF::FLAG_MIN_MIP)
|
|
384
382
|
.value("PROCEDURAL", VTF::FLAG_PROCEDURAL)
|
|
385
383
|
.value("ONE_BIT_ALPHA", VTF::FLAG_ONE_BIT_ALPHA)
|
|
386
384
|
.value("MULTI_BIT_ALPHA", VTF::FLAG_MULTI_BIT_ALPHA)
|
|
@@ -389,35 +387,58 @@ void register_python(py::module_& m) {
|
|
|
389
387
|
.value("DEPTH_RENDERTARGET", VTF::FLAG_DEPTH_RENDERTARGET)
|
|
390
388
|
.value("NO_DEBUG_OVERRIDE", VTF::FLAG_NO_DEBUG_OVERRIDE)
|
|
391
389
|
.value("SINGLE_COPY", VTF::FLAG_SINGLE_COPY)
|
|
392
|
-
.
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
.value("
|
|
396
|
-
.value("
|
|
397
|
-
.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
.value("
|
|
401
|
-
.value("
|
|
402
|
-
.value("
|
|
403
|
-
.value("
|
|
404
|
-
.
|
|
405
|
-
|
|
406
|
-
|
|
390
|
+
.export_values();
|
|
391
|
+
|
|
392
|
+
py::enum_<VTF::FlagsV2>(cVTF, "FlagsV2", py::is_flag())
|
|
393
|
+
.value("NO_DEPTH_BUFFER", VTF::FLAG_V2_NO_DEPTH_BUFFER)
|
|
394
|
+
.value("CLAMP_U", VTF::FLAG_V2_CLAMP_U)
|
|
395
|
+
.export_values();
|
|
396
|
+
|
|
397
|
+
py::enum_<VTF::FlagsV3>(cVTF, "FlagsV3", py::is_flag())
|
|
398
|
+
.value("LOAD_ALL_MIPS", VTF::FLAG_V3_LOAD_ALL_MIPS)
|
|
399
|
+
.value("VERTEX_TEXTURE", VTF::FLAG_V3_VERTEX_TEXTURE)
|
|
400
|
+
.value("SSBUMP", VTF::FLAG_V3_SSBUMP)
|
|
401
|
+
.value("BORDER", VTF::FLAG_V3_BORDER)
|
|
402
|
+
.export_values();
|
|
403
|
+
|
|
404
|
+
py::enum_<VTF::FlagsV4>(cVTF, "FlagsV4", py::is_flag())
|
|
405
|
+
.value("SRGB", VTF::FLAG_V4_SRGB)
|
|
406
|
+
.export_values();
|
|
407
|
+
|
|
408
|
+
py::enum_<VTF::FlagsV4_TF2>(cVTF, "FlagsV4_TF2", py::is_flag())
|
|
409
|
+
.value("STAGING_MEMORY", VTF::FLAG_V4_TF2_STAGING_MEMORY)
|
|
410
|
+
.value("IMMEDIATE_CLEANUP", VTF::FLAG_V4_TF2_IMMEDIATE_CLEANUP)
|
|
411
|
+
.value("IGNORE_PICMIP", VTF::FLAG_V4_TF2_IGNORE_PICMIP)
|
|
412
|
+
.value("STREAMABLE_COARSE", VTF::FLAG_V4_TF2_STREAMABLE_COARSE)
|
|
413
|
+
.value("STREAMABLE_FINE", VTF::FLAG_V4_TF2_STREAMABLE_FINE)
|
|
414
|
+
.export_values();
|
|
415
|
+
|
|
416
|
+
py::enum_<VTF::FlagsV5>(cVTF, "FlagsV5", py::is_flag())
|
|
417
|
+
.value("PWL_CORRECTED", VTF::FLAG_V5_PWL_CORRECTED)
|
|
418
|
+
.value("SRGB", VTF::FLAG_V5_SRGB)
|
|
419
|
+
.value("DEFAULT_POOL", VTF::FLAG_V5_DEFAULT_POOL)
|
|
420
|
+
.value("LOAD_MOST_MIPS", VTF::FLAG_V5_LOAD_MOST_MIPS)
|
|
421
|
+
.export_values();
|
|
422
|
+
|
|
423
|
+
py::enum_<VTF::FlagsV5_CSGO>(cVTF, "FlagsV5_CSGO", py::is_flag())
|
|
424
|
+
.value("COMBINED", VTF::FLAG_V5_CSGO_COMBINED)
|
|
425
|
+
.value("ASYNC_DOWNLOAD", VTF::FLAG_V5_CSGO_ASYNC_DOWNLOAD)
|
|
426
|
+
.value("SKIP_INITIAL_DOWNLOAD", VTF::FLAG_V5_CSGO_SKIP_INITIAL_DOWNLOAD)
|
|
427
|
+
.value("YCOCG", VTF::FLAG_V5_CSGO_YCOCG)
|
|
428
|
+
.value("ASYNC_SKIP_INITIAL_LOW_RES", VTF::FLAG_V5_CSGO_ASYNC_SKIP_INITIAL_LOW_RES)
|
|
407
429
|
.export_values();
|
|
408
430
|
|
|
409
431
|
py::enum_<VTF::Platform>(cVTF, "Platform")
|
|
410
432
|
.value("UNKNOWN", VTF::PLATFORM_UNKNOWN)
|
|
411
433
|
.value("PC", VTF::PLATFORM_PC)
|
|
412
|
-
.value("PS3_PORTAL2", VTF::PLATFORM_PS3_PORTAL2)
|
|
413
|
-
.value("PS3_ORANGEBOX", VTF::PLATFORM_PS3_ORANGEBOX)
|
|
414
434
|
.value("X360", VTF::PLATFORM_X360)
|
|
435
|
+
.value("PS3_ORANGEBOX", VTF::PLATFORM_PS3_ORANGEBOX)
|
|
436
|
+
.value("PS3_PORTAL2", VTF::PLATFORM_PS3_PORTAL2)
|
|
415
437
|
.export_values();
|
|
416
438
|
|
|
417
439
|
py::class_<VTF::CreationOptions>(cVTF, "CreationOptions")
|
|
418
440
|
.def(py::init<>())
|
|
419
|
-
.def_rw("
|
|
420
|
-
.def_rw("minor_version", &VTF::CreationOptions::minorVersion)
|
|
441
|
+
.def_rw("version", &VTF::CreationOptions::version)
|
|
421
442
|
.def_rw("output_format", &VTF::CreationOptions::outputFormat)
|
|
422
443
|
.def_rw("width_resize_method", &VTF::CreationOptions::widthResizeMethod)
|
|
423
444
|
.def_rw("height_resize_method", &VTF::CreationOptions::heightResizeMethod)
|
|
@@ -426,7 +447,6 @@ void register_python(py::module_& m) {
|
|
|
426
447
|
.def_rw("initial_frame_count", &VTF::CreationOptions::initialFrameCount)
|
|
427
448
|
.def_rw("start_frame", &VTF::CreationOptions::startFrame)
|
|
428
449
|
.def_rw("is_cubemap", &VTF::CreationOptions::isCubeMap)
|
|
429
|
-
.def_rw("has_spheremap", &VTF::CreationOptions::hasSphereMap)
|
|
430
450
|
.def_rw("initial_slice_count", &VTF::CreationOptions::initialSliceCount)
|
|
431
451
|
.def_rw("compute_transparency_flags", &VTF::CreationOptions::computeTransparencyFlags)
|
|
432
452
|
.def_rw("compute_mips", &VTF::CreationOptions::computeMips)
|
|
@@ -439,9 +459,14 @@ void register_python(py::module_& m) {
|
|
|
439
459
|
.def_rw("invert_green_channel", &VTF::CreationOptions::invertGreenChannel);
|
|
440
460
|
|
|
441
461
|
cVTF
|
|
442
|
-
.def_ro_static("
|
|
443
|
-
.def_ro_static("
|
|
444
|
-
.def_ro_static("
|
|
462
|
+
.def_ro_static("FLAGS_MASK_V0", &VTF::FLAGS_MASK_V0)
|
|
463
|
+
.def_ro_static("FLAGS_MASK_V2", &VTF::FLAGS_MASK_V2)
|
|
464
|
+
.def_ro_static("FLAGS_MASK_V3", &VTF::FLAGS_MASK_V3)
|
|
465
|
+
.def_ro_static("FLAGS_MASK_V4", &VTF::FLAGS_MASK_V4)
|
|
466
|
+
.def_ro_static("FLAGS_MASK_V4_TF2", &VTF::FLAGS_MASK_V4_TF2)
|
|
467
|
+
.def_ro_static("FLAGS_MASK_V5", &VTF::FLAGS_MASK_V5)
|
|
468
|
+
.def_ro_static("FLAGS_MASK_V5_CSGO", &VTF::FLAGS_MASK_V5_CSGO)
|
|
469
|
+
.def_ro_static("FLAGS_MASK_INTERNAL", &VTF::FLAGS_MASK_INTERNAL)
|
|
445
470
|
.def_ro_static("FORMAT_UNCHANGED", &VTF::FORMAT_UNCHANGED)
|
|
446
471
|
.def_ro_static("FORMAT_DEFAULT", &VTF::FORMAT_DEFAULT)
|
|
447
472
|
.def(py::init<>())
|
|
@@ -461,8 +486,7 @@ void register_python(py::module_& m) {
|
|
|
461
486
|
.def_static("create_from_file_and_bake", py::overload_cast<const std::string&, const std::string&, VTF::CreationOptions>(&VTF::create), py::arg("image_path"), py::arg("vtf_path"), py::arg("creation_options") = VTF::CreationOptions{})
|
|
462
487
|
.def_static("create_from_file", py::overload_cast<const std::string&, VTF::CreationOptions>(&VTF::create), py::arg("image_path"), py::arg("creation_options") = VTF::CreationOptions{})
|
|
463
488
|
.def_prop_rw("platform", &VTF::getPlatform, &VTF::setPlatform)
|
|
464
|
-
.def_prop_rw("
|
|
465
|
-
.def_prop_rw("version_minor", &VTF::getMinorVersion, &VTF::setMinorVersion)
|
|
489
|
+
.def_prop_rw("version", &VTF::getVersion, &VTF::setVersion)
|
|
466
490
|
.def_prop_rw("image_width_resize_method", &VTF::getImageWidthResizeMethod, &VTF::setImageWidthResizeMethod)
|
|
467
491
|
.def_prop_rw("image_height_resize_method", &VTF::getImageHeightResizeMethod, &VTF::setImageHeightResizeMethod)
|
|
468
492
|
.def_prop_ro("width", &VTF::getWidth)
|
|
@@ -473,8 +497,10 @@ void register_python(py::module_& m) {
|
|
|
473
497
|
.def_prop_rw("flags", &VTF::getFlags, &VTF::setFlags)
|
|
474
498
|
.def("add_flags", &VTF::addFlags, py::arg("flags"))
|
|
475
499
|
.def("remove_flags", &VTF::removeFlags, py::arg("flags"))
|
|
500
|
+
.def("is_srgb", &VTF::isSRGB)
|
|
501
|
+
.def("set_srgb", &VTF::setSRGB, py::arg("srgb"))
|
|
476
502
|
.def("compute_transparency_flags", &VTF::computeTransparencyFlags)
|
|
477
|
-
.def_static("get_default_compressed_format", &VTF::getDefaultCompressedFormat, py::arg("input_format"), py::arg("
|
|
503
|
+
.def_static("get_default_compressed_format", &VTF::getDefaultCompressedFormat, py::arg("input_format"), py::arg("version"), py::arg("is_cubemap"))
|
|
478
504
|
.def_prop_ro("format", &VTF::getFormat)
|
|
479
505
|
.def("set_format", &VTF::setFormat, py::arg("new_format"), py::arg("filter") = ImageConversion::ResizeFilter::DEFAULT)
|
|
480
506
|
.def_prop_rw("mip_count", &VTF::getMipCount, &VTF::setMipCount)
|
|
@@ -482,9 +508,9 @@ void register_python(py::module_& m) {
|
|
|
482
508
|
.def("compute_mips", &VTF::computeMips, py::arg("filter") = ImageConversion::ResizeFilter::DEFAULT)
|
|
483
509
|
.def_prop_rw("frame_count", &VTF::getFrameCount, &VTF::setFrameCount)
|
|
484
510
|
.def_prop_ro("face_count", &VTF::getFaceCount)
|
|
485
|
-
.def("set_face_count", &VTF::setFaceCount, py::arg("is_cubemap")
|
|
511
|
+
.def("set_face_count", &VTF::setFaceCount, py::arg("is_cubemap"))
|
|
486
512
|
.def_prop_rw("slice_count", &VTF::getSliceCount, &VTF::setSliceCount)
|
|
487
|
-
.def("set_frame_face_and_slice_count", &VTF::setFrameFaceAndSliceCount, py::arg("new_frame_count"), py::arg("is_cubemap"), py::arg("
|
|
513
|
+
.def("set_frame_face_and_slice_count", &VTF::setFrameFaceAndSliceCount, py::arg("new_frame_count"), py::arg("is_cubemap"), py::arg("new_slice_count") = 1)
|
|
488
514
|
.def_prop_rw("start_frame", &VTF::getStartFrame, &VTF::setStartFrame)
|
|
489
515
|
.def_prop_rw("reflectivity", &VTF::getReflectivity, &VTF::setReflectivity)
|
|
490
516
|
.def("compute_reflectivity", &VTF::computeReflectivity)
|
|
@@ -522,7 +548,6 @@ void register_python(py::module_& m) {
|
|
|
522
548
|
.def_prop_rw("compression_level", &VTF::getCompressionLevel, &VTF::setCompressionLevel)
|
|
523
549
|
.def_prop_rw("compression_method", &VTF::getCompressionMethod, &VTF::setCompressionMethod)
|
|
524
550
|
.def("has_image_data", &VTF::hasImageData)
|
|
525
|
-
.def("image_data_is_srgb", &VTF::imageDataIsSRGB)
|
|
526
551
|
.def("get_image_data_raw", [](const VTF& self, uint8_t mip = 0, uint16_t frame = 0, uint8_t face = 0, uint16_t slice = 0) {
|
|
527
552
|
const auto d = self.getImageDataRaw(mip, frame, face, slice);
|
|
528
553
|
return py::bytes{d.data(), d.size()};
|
|
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
|