[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14349] trunk/blender/source/blender/ python/api2_2x/Library.c: annoyance with python api, Blender.Library. Datablocks should always return an empty list, rather then None when there is no datablocks.

Campbell Barton ideasman42 at gmail.com
Mon Apr 7 12:12:21 CEST 2008


Revision: 14349
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14349
Author:   campbellbarton
Date:     2008-04-07 12:12:21 +0200 (Mon, 07 Apr 2008)

Log Message:
-----------
annoyance with python api, Blender.Library.Datablocks should always return an empty list, rather then None when there is no datablocks.

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Library.c

Modified: trunk/blender/source/blender/python/api2_2x/Library.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Library.c	2008-04-07 05:54:19 UTC (rev 14348)
+++ trunk/blender/source/blender/python/api2_2x/Library.c	2008-04-07 10:12:21 UTC (rev 14349)
@@ -279,10 +279,11 @@
 			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;
 }
 
 /**





More information about the Bf-blender-cvs mailing list