[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52395] trunk/blender/source/blender/ python/bmesh/bmesh_py_ops.c: py api: remove ".out" from the names of dict keys returned from bmesh operators.

Campbell Barton ideasman42 at gmail.com
Tue Nov 20 06:58:19 CET 2012


Revision: 52395
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52395
Author:   campbellbarton
Date:     2012-11-20 05:58:17 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
py api: remove ".out" from the names of dict keys returned from bmesh operators.

Modified Paths:
--------------
    trunk/blender/source/blender/python/bmesh/bmesh_py_ops.c

Modified: trunk/blender/source/blender/python/bmesh/bmesh_py_ops.c
===================================================================
--- trunk/blender/source/blender/python/bmesh/bmesh_py_ops.c	2012-11-20 05:50:19 UTC (rev 52394)
+++ trunk/blender/source/blender/python/bmesh/bmesh_py_ops.c	2012-11-20 05:58:17 UTC (rev 52395)
@@ -376,7 +376,20 @@
 				item = (Py_INCREF(Py_None), Py_None);
 			}
 
+#if 1
+			/* temp code, strip off '.out' while we keep this convention */
+			{
+				char slot_name_strip[MAX_SLOTNAME];
+				char *ch = strchr(slot->slot_name, '.');  /* can't fail! */
+				int tot = ch - slot->slot_name;
+				BLI_assert(ch != NULL);
+				memcpy(slot_name_strip, slot->slot_name, tot);
+				slot_name_strip[tot] = '\0';
+				PyDict_SetItemString(ret, slot_name_strip, item);
+			}
+#else
 			PyDict_SetItemString(ret, slot->slot_name, item);
+#endif
 			Py_DECREF(item);
 		}
 	}




More information about the Bf-blender-cvs mailing list