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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-12 06:02:53 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-12 06:02:53 +0400
commit94ae0232b0337ab70cecaef03cd845887cd36eaa (patch)
treecaea2819c7fe0400fb91c9bdf0e99a9e0fd50cf6 /source/blender/makesrna/intern/rna_mesh.c
parent9a109c22ae1ef8a5c75932d661610b23ec685bd7 (diff)
parentf68e9db583489d541d535791536ea20bc1ae1d76 (diff)
Merged changes in the trunk up to revision 53729.
Conflicts resolved: release/datafiles/startup.blend source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 31e27ebc982..8c8b7b4f637 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1233,6 +1233,26 @@ static char *rna_MeshStringProperty_path(PointerRNA *ptr)
return rna_PolyCustomData_data_path(ptr, "layers_string", CD_PROP_STR);
}
+/* XXX, we dont have propper byte string support yet, so for now use the (bytes + 1)
+ * bmesh API exposes correct python/bytestring access */
+void rna_MeshStringProperty_s_get(PointerRNA *ptr, char *value)
+{
+ MStringProperty *ms = (MStringProperty *)ptr->data;
+ BLI_strncpy(value, ms->s, (int)ms->s_len + 1);
+}
+
+int rna_MeshStringProperty_s_length(PointerRNA *ptr)
+{
+ MStringProperty *ms = (MStringProperty *)ptr->data;
+ return (int)ms->s_len + 1;
+}
+
+void rna_MeshStringProperty_s_set(PointerRNA *ptr, const char *value)
+{
+ MStringProperty *ms = (MStringProperty *)ptr->data;
+ BLI_strncpy(ms->s, value, sizeof(ms->s));
+}
+
static int rna_Mesh_tot_vert_get(PointerRNA *ptr)
{
Mesh *me = rna_mesh(ptr);
@@ -2182,6 +2202,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
/* 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_string_funcs(prop, "rna_MeshStringProperty_s_get", "rna_MeshStringProperty_s_length", "rna_MeshStringProperty_s_set");
RNA_def_property_ui_text(prop, "Value", "");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -3010,6 +3031,22 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Mesh_update_vertmask");
+
+
+ /* customdata flags */
+ prop = RNA_def_property(srna, "use_customdata_vertex_bevel", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "cd_flag", ME_CDFLAG_VERT_BWEIGHT);
+ RNA_def_property_ui_text(prop, "Store Vertex Bevel Weight", "");
+
+ prop = RNA_def_property(srna, "use_customdata_edge_bevel", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "cd_flag", ME_CDFLAG_EDGE_BWEIGHT);
+ RNA_def_property_ui_text(prop, "Store Edge Bevel Weight", "");
+
+ prop = RNA_def_property(srna, "use_customdata_edge_crease", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "cd_flag", ME_CDFLAG_EDGE_CREASE);
+ RNA_def_property_ui_text(prop, "Store Edge Crease", "");
+
+
/* readonly editmesh info - use for extrude menu */
prop = RNA_def_property(srna, "total_vert_sel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_tot_vert_get", NULL, NULL);