[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14654] trunk/blender/source/blender/ python/api2_2x/Node.c: == PyNodes ==

Willian Padovani Germano wpgermano at gmail.com
Fri May 2 03:01:53 CEST 2008


Revision: 14654
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14654
Author:   ianwill
Date:     2008-05-02 03:01:51 +0200 (Fri, 02 May 2008)

Log Message:
-----------
== PyNodes ==

Fix to previous commit, that limited the number of sockets a script could add to a pynode). Remembered that the number of sockets should be limited to MAX_SOCKET - 1 (was MAX_SOCKET), since the pynodes code creates one more at the end to mark the end of the array.

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

Modified: trunk/blender/source/blender/python/api2_2x/Node.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Node.c	2008-05-02 00:16:48 UTC (rev 14653)
+++ trunk/blender/source/blender/python/api2_2x/Node.c	2008-05-02 01:01:51 UTC (rev 14654)
@@ -361,10 +361,10 @@
 
 	len = PyTuple_Size(tuple);
 
-	if (len > MAX_SOCKET) {
+	if (len >= MAX_SOCKET) {
 		char error_msg[70];
 		PyOS_snprintf(error_msg, sizeof(error_msg),
-			"limit exceeded: each node can't have more than %d i/o sockets", MAX_SOCKET);
+			"limit exceeded: each node can't have more than %d i/o sockets", MAX_SOCKET - 1);
 		PyErr_SetString(PyExc_AttributeError, error_msg);
 		len = 0;
 		retval = -1;





More information about the Bf-blender-cvs mailing list