[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39233] trunk/blender/source/blender/ python/intern/bpy_rna_array.c: fix [#28196] Unwrap tris in lightmap pack

Campbell Barton ideasman42 at gmail.com
Tue Aug 9 22:00:53 CEST 2011


Revision: 39233
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39233
Author:   campbellbarton
Date:     2011-08-09 20:00:53 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
fix [#28196] Unwrap tris in lightmap pack

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_rna_array.c

Modified: trunk/blender/source/blender/python/intern/bpy_rna_array.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna_array.c	2011-08-09 19:59:01 UTC (rev 39232)
+++ trunk/blender/source/blender/python/intern/bpy_rna_array.c	2011-08-09 20:00:53 UTC (rev 39233)
@@ -285,17 +285,20 @@
 	int totdim= RNA_property_array_dimension(ptr, prop, NULL);
 	const int seq_size= PySequence_Size(seq);
 
-	/* General note for 'data' being NULL or PySequence_GetItem() failing.
+	/* Regarding PySequence_GetItem() failing.
 	 *
 	 * This should never be NULL since we validated it, _but_ some triky python
 	 * developer could write their own sequence type which succeeds on
-	 * validating but fails later somehow, so include checks for safety. */
+	 * validating but fails later somehow, so include checks for safety.
+	 */
 
+	/* Note that 'data can be NULL' */
+
 	if(seq_size == -1) {
 		return NULL;
 	}
 
-	for (i= 0; (i < seq_size) && data; i++) {
+	for (i= 0; i < seq_size; i++) {
 		PyObject *item= PySequence_GetItem(seq, i);
 		if(item) {
 			if (dim + 1 < totdim) {




More information about the Bf-blender-cvs mailing list