diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 07f7dfc0d09..7355fa2a0c9 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -103,8 +103,8 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -163,8 +163,8 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -234,8 +234,8 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -295,8 +295,8 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -370,8 +370,8 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -439,8 +439,8 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -511,8 +511,8 @@ PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -617,8 +617,8 @@ PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -692,8 +692,8 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; } @@ -747,8 +747,8 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) { StructRNA *srna; - if (PyTuple_GET_SIZE(args) > 0) { - PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this. + if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) { + PyErr_SetString(PyExc_ValueError, "all args must be keywords"); return NULL; }