Commit Graph

114 Commits (f75102d6875ba8c2305f6b3351f3033102201e5c)

Author SHA1 Message Date
Vincent Fazio 91e93578c7
Update Python structs with missing fields (#5673) 2024-07-17 21:25:16 +02:00
Markus Prettner 7e053cc641
Fix names of enum values in docstring of aiProcess_FindDegenerates (#5640)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-07-02 22:11:52 +02:00
Kim Kulling 07ab05cc41
Fix init aistring issue 5622 inpython module (#5625)
* Draft: Update init of aiString

- closes https://github.com/assimp/assimp/issues/5622

* Update types.h

* Fix typo

* Fix another typo

* Adapt usage of AI_MAXLEN

* Fix compare operator

* Add missing renames

* Add missing renames
2024-06-17 23:52:23 +02:00
Emily Banerjee ff5b0ae575
Fix PyAssimp under Python >= 3.12 and macOS library search support (#5397)
* Fix PyAssimp under Python >= 3.12

* Make PyAssimp search DYLD_LIBRARY_PATH under macOS

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-02-08 20:46:36 +01:00
Kim Kulling 7d542eb795
Merge branch 'master' into py_available_formats 2023-07-02 20:26:16 +02:00
Marco Feuerstein b2cad5c58d Use file system encoding. 2023-06-29 14:56:11 +02:00
Marco Feuerstein d1edaa949b Fix passing of file extension string.
Previously only the first letter of the string was passed to c, now it passes the whole extension.
2023-06-29 14:51:16 +02:00
Marco Feuerstein 59f2620164 Remove unneeded check for empty extension. 2023-06-29 08:21:09 +02:00
Marco Feuerstein 261c7769b8 Replace static list of supported file extensions with the actually supported ones. 2023-06-29 08:21:08 +02:00
FeeshWyvern f9fcf33aaa Bug fix: We should not be accessing `mPrivate` according to structs.Scene and fixes a crash when `mPrivate` points to invalid data. 2023-02-27 20:06:05 -08:00
FeeshWyvern 94d9773548 Bug fix: Correctly set the name of the attributes. PR #3940 did not seem to update in Master? 2023-02-27 20:02:34 -08:00
Steve M eff13f6a40 Update morph mesh documentation now that gltf known to work 2023-01-25 20:52:25 -08:00
Manuel López Antequera e49ee6cfb2
PyAssimp fix: don't always search anaconda paths
The helper was erroneously adding the Anaconda paths to the search.
2021-07-08 09:51:05 +02:00
Kim Kulling b4fc41bc09
Use corret attribute name
- closes https://github.com/assimp/assimp/issues/3887
2021-06-03 22:52:10 +02:00
Chuck Claunch 18beae988c Add support for arm 64 bit 2021-05-12 21:57:24 +00:00
Eric Olson f17d58cadd Use POINTER(c_char) for binary data with pyassimp
"For a general character pointer that may also point to binary data,
POINTER(c_char) must be used." c_char_p is for a zero-terminated string.

Reference: https://docs.python.org/3/library/ctypes.html#ctypes.c_char_p

Applying this change to the 4.1.4 released python module fixes #2339 for
me in Ubuntu.
2021-05-04 13:38:38 -05:00
David efbabf3b0d Implement contextmanager for load 2020-06-09 08:32:59 +02:00
Aaron Franke 1529f9518f
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 02:34:12 -04:00
Shawn Presser f305f10551 Only try to initialize members whose name starts with 'm' followed by an uppercase character 2020-03-09 00:05:17 -07:00
IOhannes m zmölnig 660f3571d8 added AnimMesh.mName member
Closes: https://github.com/assimp/assimp/issues/2822
2019-12-09 17:25:20 +01:00
IOhannes m zmölnig 630f013a5e fix field name "Mesh.mAnimMesh" -> "Mesh.mAnimMeshes"
to match the name in mesh.h: aiMesh.mAnimMeshes
2019-12-07 22:10:26 +01:00
IOhannes m zmölnig d24adbd32c aiString.length is really of type "ai_uint32" which corresponds to "c_uint32"
and not to "c_size_t" (which is different on 64bit systems and 32bit systems!)

Closes: https://github.com/assimp/assimp/issues/2788
2019-12-07 22:09:03 +01:00
IOhannes m zmölnig 298a89b4ee remove trailing whitespace 2019-12-07 22:06:14 +01:00
IOhannes m zmölnig 71cac7ab8d lower-case PEP263 encoding declaration
so emacs likes it...
2019-12-07 22:04:04 +01:00
Robert Spencer e1322f9178 Fix indentation error in python bindings 2019-09-10 20:38:31 +01:00
Kim Kulling 01070b4de7 closes https://github.com/assimp/assimp/issues/2439: add null ptr test before calling hasAttr. 2019-07-04 22:34:11 +02:00
Eric Olson 3924a5c32a Ensure obj is not null before using hasattr
Fixes error shown below:
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 320, in load
    scene = _init(model.contents)
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 206, in _init
    raise e
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 187, in _init
    call_init(e, target)
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 80, in call_init
    _init(obj.contents, obj, caller)
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 214, in _init
    if _is_init_type(obj):
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\core.py", line 86, in _is_init_type
    if helper.hasattr_silent(obj,'contents'): #pointer
  File "C:\Users\micro\build2\boxwin_external_libs\pyassimp\helper.py", line 277, in hasattr_silent
    return hasattr(object, name)
ValueError: NULL pointer access
2019-05-27 13:06:38 -05:00
Andor Goetzendorff b10dc5747b Revert "Remove experimental change unintentionally included in commit f001dfc8"
This reverts commit e45d120f21.
2019-05-20 15:35:19 +02:00
Huarong Chen b6d3cbcb61
Fix "bytes aketrans" issues in Python>=3.1
Issue https://github.com/assimp/assimp/issues/2339
2019-04-17 14:19:00 +08:00
Charlie Gettys e45d120f21 Remove experimental change unintentionally included in commit f001dfc8 2019-03-29 18:43:57 -04:00
Charlie Gettys f001dfc840 * Fix error in previous commit improving imports 2019-03-29 18:36:17 -04:00
Charlie Gettys 5a53fbd65f port/PyAssimp/pyassimp/: Fix new warnings 2019-03-29 18:36:17 -04:00
Charlie Gettys 1b9157440f port/PyAssimp/pyassimp/structs.py: remove unused import of c_int 2019-03-29 18:36:17 -04:00
Charlie Gettys 1614b7bea4 port/PyAssimp/pyassimp/core.py: convert_assimp_string now switches on
version instead of just catching the exception if unicode is not defined
& _init_face uses is None instead of == None
2019-03-29 18:36:17 -04:00
Charlie Gettys 7930de9f37 port/PyAssimp/pyassimp/helper.py: replace from ctypes import POINTER; POINTER(something) with ctypes.POINTER(something) to remove warning about importing ctype twice 2019-03-29 18:36:17 -04:00
Charlie Gettys e849b94f68 port/PyAssimp/pyassimp/core.py & helper.py: catch specific exceptions instead of BaseException 2019-03-29 18:36:17 -04:00
Charlie Gettys 51844b206d port/PyAssimp/pyassimp/formats.py: add missing comma (implicit string concatenation, assumed unintentional) 2019-03-29 18:36:17 -04:00
Charlie Gettys 4e714fce0e port/PyAssimp/pyassimp/core.py: remove unused import & second import of ctypes 2019-03-29 18:36:17 -04:00
Charlie Gettys 49033513ef port/PyAssimp/pyassimp/core.py: remove deprecated unused import & unnecessary from ctype import pointer 2019-03-29 18:36:17 -04:00
Charlie Gettys eb81619e56 Fix core.py raising string instead of correct RuntimeError 2019-03-29 18:36:17 -04:00
Kim Kulling b3c2fdc11d python: fix review findings. 2018-12-23 14:28:40 +01:00
Vincent Fazio 8cb0b4ce2b Updated pyassimp function description 2018-09-21 11:02:14 +10:00
Vincent Fazio ef4e317625 Improved some comments 2018-09-21 10:51:38 +10:00
Vincent Fazio 3402cd81c7 Added interface to 'aiExportSceneToBlob()' for pyassimp 2018-09-21 10:31:21 +10:00
Vincent Fazio 0adc032f69 Updated to be in sync with assimp header files 2018-09-14 13:09:44 +10:00
Wojciech Matyjewicz fdf52f3d25 Build Python representation for metadata. 2018-09-02 00:52:24 +02:00
Wojciech Matyjewicz 8bbfac1f04 Factor out Assimp string -> Python string conversion code. 2018-09-02 00:51:14 +02:00
Wojciech Matyjewicz 475ed6fdc3 Fix metadata property type declarations. 2018-09-01 10:15:09 +02:00
Wojciech Matyjewicz 7004066532 Fix inconsistent newlines.
LF newlines have been changed to CR LF to match the rest of the file.
2018-09-01 10:11:59 +02:00
Vincent Fazio ecd24a736c Add missing metadata fields 2018-08-24 12:06:24 +10:00