1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
21 # Script copyright (C) 2006-2012, assimp team
22 # Script copyright (C) 2013 Blender Foundation
34 FLOAT32_ARRAY
= b
'f'[0]
35 FLOAT64_ARRAY
= b
'd'[0]
39 # Some other misc defines
40 # Known combinations so far - supposed meaning: A = animatable, A+ = animated, U = UserProp
41 # VALID_NUMBER_FLAGS = {b'A', b'A+', b'AU', b'A+U'} # Not used...
43 # array types - actual length may vary (depending on underlying C implementation)!
46 # For now, bytes and bool are assumed always 1byte.
53 size
= array
.array(_t
).itemsize
58 if ARRAY_INT32
and ARRAY_INT64
:
61 raise Exception("Impossible to get a 4-bytes integer type for array!")
63 raise Exception("Impossible to get an 8-bytes integer type for array!")
68 size
= array
.array(_t
).itemsize
73 if ARRAY_FLOAT32
and ARRAY_FLOAT64
:
76 raise Exception("Impossible to get a 4-bytes float type for array!")
78 raise Exception("Impossible to get an 8-bytes float type for array!")