Vladimír Vondruš
e59f8445f8
doc: updated changelog.
3 years ago
Vladimír Vondruš
89fa0d3f93
python: data access in trade.SceneData.
...
Just regular boring code, all the cool stuff was invented for MeshData
already.
3 years ago
Vladimír Vondruš
d62b44e3cd
python: support also normalized VertexFormat values.
...
They're unpacked to full floats on element access and packed back from
full floats on mutable access, which makes this all very nice and
transparent. Yay Python!
That's it for now, I'll postpone half-float and matrix types for later
when these are actually needed, as it needs extra testing for the
aligned variants too.
3 years ago
Vladimír Vondruš
c07952fc18
python: have a common header with Python format string definitions.
...
To not have to duplicate these for each and every case, enlarging the
surface for potential bugs. Also changing the signatures to number +
identifier, instead of identifier repeated number of times. Means the
compiler won't be able to deduplicate / overlap the literals in the
binary, but is much more maintainable.
For Numpy this causes the slices to be reported as actual typed Numpy
arrays instead of typeless tuples, which is good I guess? Not sure why
that wasn't the case before, or what is the difference, and how it will
behave for sparse types such as aligned matrices.
3 years ago
Vladimír Vondruš
173a01f1b6
python: rename Python struct format helper to avoid clashes.
3 years ago
Vladimír Vondruš
5820b9da60
python: doc++
3 years ago
Vladimír Vondruš
21fb02ff65
python: fix & test handling of cast/packed VertexFormats.
...
It was casting in the wrong direction, causing an unbound type to be
returned and also accessing the data totally wrong. Should have tested
this properly in the first place.
3 years ago
Vladimír Vondruš
15a06c82c1
python: no need to cast sub-32bit scalar VertexFormats apparently.
...
Pybind handles that on its own. Only the vector types need this.
3 years ago
Vladimír Vondruš
bbd7ccedb1
python: expose trade.SceneData basics together with importer APIs.
...
No data access yet, that'll come later.
3 years ago
Vladimír Vondruš
744bffada6
python: compact trade.AbstractImporter image tests a bit.
3 years ago
Vladimír Vondruš
9c1e4c7add
python: use PyErr_SetNone() if the string is empty.
3 years ago
Vladimír Vondruš
551fd567f9
python: distinguish OOB ID and OOB level in trade.AbstractImporter.
...
So when it fails, it's possible to know on which.
3 years ago
Vladimír Vondruš
165416f73b
python: add code coverage markers for trade bindings.
...
Not desirable to test all possible types, and some unreachable parts are
indeed unreachable.
3 years ago
Vladimír Vondruš
526def5f45
python: parametrize AbstractImporter name helpers by return type.
...
For objects it'll be 64-bit IDs, not 32-bit.
3 years ago
Vladimír Vondruš
d20727c995
python: move MeshData.attribute_id() info to the relevant function.
3 years ago
Vladimír Vondruš
47f4353f69
Indent glTF files with two spaces.
3 years ago
Vladimír Vondruš
f59d8bb9b6
python: test trade.AbstractImporter.image2d() by name.
...
And a failure of the by-name API.
3 years ago
Vladimír Vondruš
8ccd378870
python: test trade.AbstractImporter.mesh() failure.
3 years ago
Vladimír Vondruš
47226d22f6
python: test also named AbstractImporter APIs with no file opened.
...
Code coverage says red!
3 years ago
Vladimír Vondruš
ee56f6f114
python: improve docs of trade.AbstractImporter APIs.
3 years ago
Vladimír Vondruš
c0c78d83f5
python: ... and compatibility with pybind11 < 2.6.2 as well.
3 years ago
Vladimír Vondruš
b811592407
python: fix compatibility with pybind11 < 2.6.
3 years ago
Vladimír Vondruš
d95c60942b
python: implement handling for custom trade.MeshAttribute values.
...
So it's possible to create them, print them and get the custom ID back.
Will be also used for SceneField and other yet-to-be-exposed enums.
3 years ago
Vladimír Vondruš
d75f31e854
python: expose new linear RGB(A) conversion APIs from Color.
3 years ago
Vladimír Vondruš
dddef56c87
python: adapt to Magnum changes.
...
Which means the API gets renamed, so a breaking change.
3 years ago
Vladimír Vondruš
a45fbb84da
python: handle Windows path insanities in the bindings directly.
...
Otherwise people wouldn't be able to conveniently use os.path, which is
an undesirable pain point. And do this for all currently exposed APIs,
not just the AbstractImporter that caused a problem.
This reverts commit 28497ec2ca .
3 years ago
Vladimír Vondruš
b3e24a11b4
python: reorder trade.MeshData APIs to have enum overloads first.
...
Because for some reason pybind11 on *some platforms* (or in some
configurations?) picks the integer overload even for enum arguments,
only because it's first in the overload set.
This is extremely brittle, but for now I don't know any better solution.
3 years ago
Vladimír Vondruš
5edd1a49f6
python: adapt the MeshData test to behavior on non-deprecated builds.
...
Sigh.
3 years ago
Vladimír Vondruš
c78cc3fd13
python: expose the BUILD_DEPRECATED constants as well.
...
Ugh, I thought I would never need them but then there are plugin
features depending on this and it's A MESS.
3 years ago
Vladimír Vondruš
28497ec2ca
python: no, using backward slashes IS NOT A GOOD IDEA, python!
3 years ago
Vladimír Vondruš
56dd4b4a36
python: updated changelog.
3 years ago
Vladimír Vondruš
d106fc09d7
python: direct access to trade.MeshData indices and attributes.
...
In concrete types. Yes. Well, some of them for now, I still need to
sleep on normalized and matrix types, how it makes the most sense to
expose those. Oh, and array attributes as well.
3 years ago
Vladimír Vondruš
211bd5f0a8
python: mutable access to trade.MeshData raw index/vertex data.
...
Not much useful on its own, but it's a prep for what comes next.
3 years ago
Vladimír Vondruš
cca2eaf659
python: expose all index/attribute property queries in trade.MeshData.
...
Except for the actual data access, that'll be done next. Also updated
the mesh test file with more useful contents.
3 years ago
Vladimír Vondruš
ae5741e4d0
python: fix to build with pybind11 2.3.
...
I should probably reconsider supporting such old versions, but no time
for that now.
3 years ago
Vladimír Vondruš
27983b66ba
python: add a dedicated test for StridedArrayView of a dynamic type.
...
Yup, this could work very well for MeshData / SceneData generic
attribute and field access with what's already there, no changes needed.
3 years ago
Vladimír Vondruš
a3f88d4db4
python: adapt to std::string removal in the GL library.
...
I really need to figure out the String[View] -> py::string conversion,
this is awful.
3 years ago
Vladimír Vondruš
eb334e1d7f
python: use the new, shorter, Size and Stride typedefs.
3 years ago
Vladimír Vondruš
7ee0c7d949
python: fix build against latest Corrade.
...
Not sure what was I thinking there, with the const.
3 years ago
Vladimír Vondruš
a1e49aa8f2
package/ci: add a CTest timeout on AppVeyor.
...
So assertion dialog boxes don't wait forever for someone to click the
mouse, sigh.
3 years ago
Vladimír Vondruš
2bc0748c05
doc: updated changelog.
3 years ago
Aaron Gokaslan
695c40b2d1
python: more missing moves, unnecessary inc_ref.
3 years ago
Vladimír Vondruš
71880c743d
python: adapt to Magnum changes.
3 years ago
Vladimír Vondruš
f6d4385a44
python: add an API-breaking TODO for Application wrappers.
...
No need to use the Configuration class here, we got named arguments
instead.
3 years ago
Vladimír Vondruš
99a22dfcd5
python: adapt to Magnum changes.
...
The Shaders classes now take a Configuration class instead of a
hard-to-distinguish list of arguments. But in Python we have named
arguments, so none of that is necessary -- I only made the arguments
explicitly keyword-only but the interface stays the same.
4 years ago
Vladimír Vondruš
2e2cea6a68
CMake: exclude test dirs from ALL with CORRADE_TESTSUITE_TEST_TARGET.
4 years ago
Vladimír Vondruš
6d02603090
package/ci: don't build MaterialTools, we don't need it for anything.
4 years ago
Vladimír Vondruš
7009d66d18
package/archlinux: use a wildcard .kateconfig for PKGBUILD highlighting.
4 years ago
Vladimír Vondruš
9bce5cfea7
doc: mention how to upgrade HEAD Homebrew packages.
4 years ago
Vladimír Vondruš
50c7f1294a
doc: there already *is* a stable version.
...
It's just half a century old.
4 years ago