Commit Graph

89 Commits (e84f961f786ed214535275b00bd5f83c1e23fb02)

Author SHA1 Message Date
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
Vincent Fazio 597628f43a Prevent 'AttributeError' when printing object attributes 2018-08-24 12:03:54 +10:00
Kim Kulling d4c7eb3b67
Update helper.py
Remove deprecated comment.
2018-06-22 16:14:20 +02:00
Kim Kulling 4a720511e4
Update helper.py
Remove dead code.
2018-06-22 16:13:46 +02:00
Ravin Kumar 7b0f100fc3
Solved pyassimp.errors.AssimpError in conda
This error occurred because of error in finding .extension files.
 
os.path.splitext(filename)[-1].lower() not in ext_whitelist:  ### this line had bugs, failed to select files with extensions .so.x  [.so.1  .so.2  .so.3.1] but worked on simple extensions only. like- .so .dll

Added a mechanism to remove this bug.
2018-06-22 12:22:27 +05:30
Andor Goetzendorff f4fd5840b1 Encode filename using file system encoding instead of ASCII 2018-05-15 15:35:44 +02:00
Robert Spencer c036a3b840 Add pyassimp code generation script for materials
In the style of gen/structsgen.py, we construct a similar method for
keeping the constants in materials.py up to date.
2018-01-10 12:33:44 +02:00
Robert Spencer ce5b78f6c0 Remove check for 'assimp' in name of directories to be searched for library in python port 2018-01-06 15:17:29 +02:00
Unknown 12dbbd4ce9 Misc. typos
Some are doxy comments, some are just trivial source comment typos. 
Found using `codespell -q 3 --skip="./contrib" -I ../assimp-whitelist.txt`
whereby whitelist contained:
```
childs
iff
lod
nto
ot
whitespaces
```
2017-11-09 17:19:26 -05:00
Daeyun Shin bf9d319489
Update helper.py
Search for libassimp.so in LD_LIBRARY_PATH if available.
2017-10-31 15:43:39 -07:00
Mel Massadian 37f5619149 created a python3 version of the 3dviewer and fixed the / = float in py3 2017-08-23 20:02:58 +02:00
rodrigo figueroa 01a288ff35 Added support for python3
When using python3 and running any of the provided scripts I get:
NameError: name 'unicode' is not defined.  Python3 does not have unicode. Using try-except method helps to support python3
2017-07-20 22:48:07 -07:00
Séverin Lemaignan 4d37f90ea5 Revert "Installing assimp library as well"
This reverts commit 33bd5cfcfb.

Installing the assimp library from setup.py is *not* a good idea as
it will break every packaging effort.

Besides, the original commit relies on an hard-coded path to find the
library that may not exist.
2017-06-06 15:14:18 +01:00
Robert Spencer 28da8c643d Adds texture type enum to pyassimp
Keeping the same style of `postprocess.py`, this is a port of the aiTextureType enum in [`material.h`](https://github.com/assimp/assimp/blob/master/include/assimp/material.h).
2017-04-26 15:05:45 +02:00
Guillaume Bittoun 33bd5cfcfb Installing assimp library as well 2017-04-08 12:14:30 +02:00
Kim Kulling 1ca54c0b2f closes https://github.com/assimp/assimp/issues/1211: defensice handling
of utf-8 decode issues.
2017-03-23 17:11:52 +01:00
Séverin Lemaignan 9aee9d6966 [pyassimp] Look as well for the assimp library using std 64bit path 2016-12-15 16:49:44 +00:00
Michael Görner f1a984bd3b only check a library folder if it actually exists
otherwise this breaks for no reason if /usr/local/lib is missing.
2016-04-22 11:35:44 +02:00
Kim Kulling 001eede34c Merge pull request #847 from stevenjt/python-scene-export
Added ability to export scenes with PyAssimp
2016-04-03 17:43:05 +02:00
Steven Thompson 06e262f892 Added ability to export scenes with PyAssimp 2016-04-03 13:03:16 +01:00
Eric Engestrom 87e7cf00a2 Fix spelling mistakes 2016-04-03 01:38:00 +01:00
Steven Thompson 2c3bbe041a Set xrange to range for Python 3.0 and above 2016-03-27 20:12:22 +01:00
Alexander Gessler 709f19e5ab Merge pull request #664 from Tcll/master
Added auto-detection of numpy
2015-10-04 16:59:24 +02:00
Tcll 5ce968c67f Added auto-detection of numpy 2015-09-28 14:18:22 -04:00
Tcll 2e725c0dc5 Added auto-detection of numpy
If numpy is not installed, pyassimp returns lists to allow the user to manage the data type.
2015-09-28 14:15:06 -04:00
Kim Kulling 85c8d7b89b PyViewer: Add local path search path for ssimp lib. 2015-08-08 17:04:46 +02:00