diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-04 00:43:31 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-04 00:43:31 +0300 |
commit | f47899fc0f716464625f43045458e222ce11603d (patch) | |
tree | 1051359e7eb24a5d40826a0ea7aaa925da7d92c0 /source/blender/python/api2_2x/Armature.c | |
parent | 9557c3a66dccc357f7a8cfecca8e23639208afd2 (diff) | |
parent | 14d5cd1c3145e6f7d6645e1d9623eb9d5d244ad9 (diff) |
Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r-- | source/blender/python/api2_2x/Armature.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index 05a89dbda21..a2a3db05bc8 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -172,28 +172,25 @@ static int BonesDict_InitEditBones(BPy_BonesDict *self) //This is the string representation of the object static PyObject *BonesDict_repr(BPy_BonesDict *self) { - char buffer[128], str[4096]; + char str[4096]; PyObject *key, *value; int pos = 0; + char *p = str; + + p += sprintf(str, "[Bone Dict: {"); - BLI_strncpy(str,"",4096); - sprintf(buffer, "[Bone Dict: {"); - strcat(str,buffer); if (self->editmode_flag){ while (PyDict_Next(self->editbonesMap, &pos, &key, &value)) { - sprintf(buffer, "%s : %s, ", PyString_AsString(key), + p += sprintf(p, "%s : %s, ", PyString_AsString(key), PyString_AsString(value->ob_type->tp_repr(value))); - strcat(str,buffer); } }else{ while (PyDict_Next(self->bonesMap, &pos, &key, &value)) { - sprintf(buffer, "%s : %s, ", PyString_AsString(key), + p += sprintf(p, "%s : %s, ", PyString_AsString(key), PyString_AsString(value->ob_type->tp_repr(value))); - strcat(str,buffer); } } - sprintf(buffer, "}]\n"); - strcat(str,buffer); + p += sprintf(p, "}]\n"); return PyString_FromString(str); } |