Merge branch 'master' into blender2.8
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 16 Jul 2018 13:16:00 +0000 (15:16 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Mon, 16 Jul 2018 13:16:00 +0000 (15:16 +0200)
source/blender/python/intern/bpy_rna.c
source/blender/python/mathutils/mathutils_Quaternion.c

index e0fbd144590bc9066c8be727269a3fa4a0207003..30bd3bc5ca3f5f26c2465833e170a5aa323a595c 100644 (file)
@@ -5118,6 +5118,9 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
                                        case PROP_RAW_DOUBLE:
                                                item = PyFloat_FromDouble((double) ((double *)array)[i]);
                                                break;
+                                       case PROP_RAW_BOOLEAN:
+                                               item = PyBool_FromLong((long) ((bool *)array)[i]);
+                                               break;
                                        default: /* PROP_RAW_UNSET */
                                                /* should never happen */
                                                BLI_assert(!"Invalid array type - get");
index 1a6fd0ee86f755befa7ad3fde76e28b6541deae0..48c18dd20c146ba20b874d25a7eccb7046107414 100644 (file)
@@ -1100,7 +1100,8 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw
 {
        PyObject *seq = NULL;
        double angle = 0.0f;
-       float quat[QUAT_SIZE] = {0.0f, 0.0f, 0.0f, 0.0f};
+       float quat[QUAT_SIZE];
+       unit_qt(quat);
 
        if (kwds && PyDict_Size(kwds)) {
                PyErr_SetString(PyExc_TypeError,