diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-20 09:58:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-20 09:58:17 +0400 |
commit | f792e288ea5f03642ddef694a3cfc79d670e2616 (patch) | |
tree | b4160da1271838288b9a5493c8b42fbdc008fdb0 /source/blender/python | |
parent | dbdc76c9d01d9f84cf315555ddabd5cba43932d3 (diff) |
py api: remove ".out" from the names of dict keys returned from bmesh operators.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_ops.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 3446209e660..dde00a6aca0 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -376,7 +376,20 @@ static PyObject *pyrna_op_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject * 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); } } |