[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27052] trunk/blender/source/blender/ python/intern/bpy_props.c: py api: bpy.props
Campbell Barton
ideasman42 at gmail.com
Sun Feb 21 13:15:38 CET 2010
Revision: 27052
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27052
Author: campbellbarton
Date: 2010-02-21 13:15:38 +0100 (Sun, 21 Feb 2010)
Log Message:
-----------
py api: bpy.props
new properties without any arguments were failing.
Modified Paths:
--------------
trunk/blender/source/blender/python/intern/bpy_props.c
Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c 2010-02-21 11:56:00 UTC (rev 27051)
+++ trunk/blender/source/blender/python/intern/bpy_props.c 2010-02-21 12:15:38 UTC (rev 27052)
@@ -82,8 +82,9 @@
{
PyObject *ret = PyTuple_New(2);
PyTuple_SET_ITEM(ret, 0, PyCapsule_New(func, NULL, NULL));
+ if(kw==NULL) kw= PyDict_New();
+ else Py_INCREF(kw);
PyTuple_SET_ITEM(ret, 1, kw);
- Py_INCREF(kw);
return ret;
}
@@ -111,7 +112,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -177,7 +178,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -254,7 +255,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -321,7 +322,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -402,7 +403,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -477,7 +478,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -555,7 +556,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -667,7 +668,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -748,7 +749,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
@@ -809,7 +810,7 @@
{
StructRNA *srna;
- if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+ if (PyTuple_GET_SIZE(args) > 0) {
PyErr_SetString(PyExc_ValueError, "all args must be keywords");
return NULL;
}
More information about the Bf-blender-cvs
mailing list