1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Script copyright (C) 2006-2012, assimp team
4 # Script copyright (C) 2013 Blender Foundation
16 FLOAT32_ARRAY
= b
'f'[0]
17 FLOAT64_ARRAY
= b
'd'[0]
21 # Some other misc defines
22 # Known combinations so far - supposed meaning: A = animatable, A+ = animated, U = UserProp
23 # VALID_NUMBER_FLAGS = {b'A', b'A+', b'AU', b'A+U'} # Not used...
25 # array types - actual length may vary (depending on underlying C implementation)!
28 # For now, bytes and bool are assumed always 1byte.
35 size
= array
.array(_t
).itemsize
40 if ARRAY_INT32
and ARRAY_INT64
:
43 raise Exception("Impossible to get a 4-bytes integer type for array!")
45 raise Exception("Impossible to get an 8-bytes integer type for array!")
50 size
= array
.array(_t
).itemsize
55 if ARRAY_FLOAT32
and ARRAY_FLOAT64
:
58 raise Exception("Impossible to get a 4-bytes float type for array!")
60 raise Exception("Impossible to get an 8-bytes float type for array!")