[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41879] trunk/blender/source/blender/ makesrna/intern: access mesh string data layer as bytes since this is low level data storage
Campbell Barton
ideasman42 at gmail.com
Tue Nov 15 15:01:24 CET 2011
Revision: 41879
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41879
Author: campbellbarton
Date: 2011-11-15 14:01:24 +0000 (Tue, 15 Nov 2011)
Log Message:
-----------
access mesh string data layer as bytes since this is low level data storage
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/makesrna.c
trunk/blender/source/blender/makesrna/intern/rna_mesh.c
Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-11-15 13:45:24 UTC (rev 41878)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2011-11-15 14:01:24 UTC (rev 41879)
@@ -524,7 +524,11 @@
}
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 @@
}
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)
Modified: trunk/blender/source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_mesh.c 2011-11-15 13:45:24 UTC (rev 41878)
+++ trunk/blender/source/blender/makesrna/intern/rna_mesh.c 2011-11-15 14:01:24 UTC (rev 41879)
@@ -1675,7 +1675,8 @@
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");
More information about the Bf-blender-cvs
mailing list