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>2011-11-15 18:01:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-15 18:01:24 +0400
commit205b554bef36a2fa7a8d5f39be80b413a5ab0c82 (patch)
tree63f27fc2baa00f98e71b7f1a0c162dc58f7f358e /source/blender/makesrna
parent3ecb7b951e76388cca68ed07ce1aaf09265ad272 (diff)
access mesh string data layer as bytes since this is low level data storage
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/makesrna.c12
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c3
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index a3054b88960..a464948c3ac 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -524,7 +524,11 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
const PropertySubType subtype= prop->subtype;
- const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+ const char *string_copy_func= (subtype==PROP_FILEPATH ||
+ subtype==PROP_DIRPATH ||
+ subtype==PROP_FILENAME ||
+ subtype==PROP_BYTESTRING) ?
+ "BLI_strncpy" : "BLI_strncpy_utf8";
rna_print_data_get(f, dp);
if(sprop->maxlength)
@@ -739,7 +743,11 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
const PropertySubType subtype= prop->subtype;
- const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+ const char *string_copy_func= (subtype==PROP_FILEPATH ||
+ subtype==PROP_DIRPATH ||
+ subtype==PROP_FILENAME ||
+ subtype==PROP_BYTESTRING) ?
+ "BLI_strncpy" : "BLI_strncpy_utf8";
rna_print_data_get(f, dp);
if(sprop->maxlength)
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 63a7df09792..421c201b3f8 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1675,7 +1675,8 @@ static void rna_def_mproperties(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh String Property", "User defined string text value in a string properties layer");
RNA_def_struct_path_func(srna, "rna_MeshStringProperty_path");
- prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
+ /* low level mesh data access, treat as bytes */
+ prop= RNA_def_property(srna, "value", PROP_STRING, PROP_BYTESTRING);
RNA_def_property_string_sdna(prop, NULL, "s");
RNA_def_property_ui_text(prop, "Value", "");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");