Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-01-15 07:49:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-15 07:59:10 +0300
commitec52e64a5df7da7637c912d79734b236049e6761 (patch)
tree8b71b3b242695e221abb2de43520ae9cadac1f31 /source/blender/python/intern/bpy_rna.c
parent02a01b35057cad8609d775df1059c68e39e9f48f (diff)
RNA: Add RNA_property_string_set_bytes
This is needed to set values that contain zero bytes (where the length isn't fixed).
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r--source/blender/python/intern/bpy_rna.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index deb045c514b..ee593c90d65 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1751,10 +1751,8 @@ static int pyrna_py_to_prop(
return -1;
}
else {
- /* same as unicode */
- /* XXX, this is suspect but needed for function calls, need to see if theres a better way */
if (data) *((char **)data) = (char *)param;
- else RNA_property_string_set(ptr, prop, param);
+ else RNA_property_string_set_bytes(ptr, prop, param, PyBytes_Size(value));
}
}
else {