[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27685] trunk/blender/source/blender/ python/intern/bpy_rna.c: report an error parsing args, will try fix properly but this involves many changes so do this for now.

Brecht Van Lommel brecht at blender.org
Tue Mar 23 16:21:18 CET 2010


Revision: 27685
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27685
Author:   blendix
Date:     2010-03-23 16:21:08 +0100 (Tue, 23 Mar 2010)

Log Message:
-----------
report an error parsing args, will try fix properly but this involves many changes so do this for now.
(commit 27671 by Campbell from render25 branch)

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

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2010-03-23 15:20:05 UTC (rev 27684)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2010-03-23 15:21:08 UTC (rev 27685)
@@ -3049,6 +3049,13 @@
 	
 	RNA_parameter_list_end(&iter);
 
+    /* TODO: arg passing is currently messed up with keyword and args,
+	 * needs reworking however this should stop annoying problems
+     * where args are ignored (for now) */
+    if(i != pyargs_len) {
+		PyErr_Format(PyExc_TypeError, "%.200s.%.200s(): congratulations, you found a bug in blender. argument %d needs to be a keyword argument until its fixed", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), i+1);
+		err= -1;
+	}
 
 	/* Check if we gave args that dont exist in the function
 	 * printing the error is slow but it should only happen when developing.





More information about the Bf-blender-cvs mailing list