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
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')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c58
2 files changed, 59 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 3ecfe416c79..f7f1d3b53bd 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -139,7 +139,7 @@ typedef struct TFace {
#define ME_DRAWCREASES (1 << 6)
#define ME_DRAWSEAMS (1 << 7)
#define ME_DRAWSHARP (1 << 8)
-#define ME_DRAWBWEIGHTS (1 << 8)
+#define ME_DRAWBWEIGHTS (1 << 9)
#define ME_DRAW_EDGELEN (1 << 10)
#define ME_DRAW_FACEAREA (1 << 11)
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");