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:
authorThomas Dinges <blender@dingto.org>2009-08-07 03:34:14 +0400
committerThomas Dinges <blender@dingto.org>2009-08-07 03:34:14 +0400
commit0ac90cabe142d685d12662bb12be3775cd58e335 (patch)
treeee8455acbf960141bcc3741476ec085a146fddf0 /source/blender/makesrna
parent042fe910aaea3e863cdd21a3b6c05a3a249b34d9 (diff)
2.5 Mesh Draw Options: [WIP]
* Added RNA for Mesh Draw Options. * Added "Draw" Options into the Mesh Data Tab, needs check for Edit Mode. * Fixed a typo in DNA.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 525814f1f5e..769c4f485fa 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1339,6 +1339,64 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
+
+ /* Mesh Draw Options for Edit Mode*/
+
+ prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES);
+ RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
+ RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
+ RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS);
+ RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
+ RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS);
+ RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS);
+ RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
+ RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+
+ prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
+ RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG);
+ RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA);
+ RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");