Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-07 14:12:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-07 14:12:21 +0400
commit66e74e6057ff4266fb3a6b19268b4c114c7cfe89 (patch)
tree68fae379d073a74c3f1e84c65815b48bc82aca44 /source
parent391191a7e3a38e80250bd67fce9d588648f2eb4d (diff)
annoyance with python api, Blender.Library.Datablocks should always return an empty list, rather then None when there is no datablocks.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Library.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c
index 12e2ce3055b..6cebd8c2be3 100644
--- a/source/blender/python/api2_2x/Library.c
+++ b/source/blender/python/api2_2x/Library.c
@@ -279,10 +279,11 @@ static PyObject *M_Library_Datablocks( PyObject * self, PyObject * value )
counter++;
}
BLI_linklist_free( names, free ); /* free linklist *and* each node's data */
- return list;
+ } else {
+ list = PyList_New( 0 );
}
- Py_RETURN_NONE;
+ return list;
}
/**