Commit Graph

8 Commits (853a5f9bbc8cdde1d6f3e99bd97a2f2b8d11ed4e)

Author SHA1 Message Date
Faule Socke 43ff04a53b Fixed a bug in the bugfix -.- 2013-07-28 22:22:49 +02:00
Faule Socke 3c02d24bf0 Fixed a bug returning not all material properties when accessing them.
Also fixed another bug occouring when no normals are provided in sample.py (lists do not have a any() method).
2013-07-28 02:10:49 +02:00
Bill Roeske 2494608927 [pyassimp] Fix py3.3 + 64bits issues
64-bit Compatibility:

The first four characters of a String material property would be cut
off. A String's length is defined in structs.py as a c_size_t
variable, which is 8 bytes wide on 64-bit Python. However, when an
aiString is used as an aiMaterial property in C/C++, the length is
truncated down to a 4-byte value on 64-bit machines (see
MaterialSystem.cpp aiMaterial::AddProperty() for details). A new
struct was declared in structs.py (MaterialPropertyString) and used
in core._get_properties().

Python 3.3 Compatibility:

The built-in function hasattr() changed in Python 3.2 to not
trap exceptions, which means a NULL pointer ValueException now
escaped when checking if a pointer was valid (hasattr(obj,
'contents') in core.call_init()) (see
http://bugs.python.org/issue9666 for details). A new helper
function was defined that preserves the legacy functionality of
trapping the exceptions (helper.hasattr_silent()) and used
throughout the code as a replacement for hasattr().

String objects would import as "bytes" rather than as a
string. This was most noticeable in the key names for
material properties, where the trailing ' of a bytes object
would remain after it was converted to a string. The
solution was to call decode() on the bytes object using
utf-8 decoding. This applies to various parts of core.py.

Closes #35
2013-06-03 10:38:30 +02:00
Alexander Gessler c50926b43b Merge pull request #10 from severin-lemaignan/for-upstream
[pyassimp] New sample application based on SDL/pygame + various fixes
2013-01-19 17:48:22 -08:00
Rodrigo Benenson c883967735 Fixed pyassimp core.py 2012-11-29 19:07:56 +01:00
Séverin Lemaignan f1bf843b55 [pyassimp] Remove obsolete code 2012-11-10 23:02:11 +01:00
Séverin Lemaignan 76d2eb7057 [pyassimp] Rework material dict
- Normalize the names
- Do not create numpy arrays for the properties
2012-11-10 22:57:07 +01:00
aramis_acg 6d3cedc0b1 - add missing files from the last commit
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1334 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
2012-11-10 16:01:55 +00:00