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-05-10 07:03:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-10 07:03:53 +0400
commit2889f5ae2c8636037462791c013c22dbdfed81de (patch)
treed5d37a83b9719b0b9a246ebe05abf9f499ac920c /source/blender/makesrna/intern/rna_camera.c
parent14c3714b81b0c264ff8e117f0230330cc0514ed2 (diff)
camera composition guides: center, thirds, golden rule
Diffstat (limited to 'source/blender/makesrna/intern/rna_camera.c')
-rw-r--r--source/blender/makesrna/intern/rna_camera.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 34b1dc85881..ff25d6d49b0 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -67,6 +67,14 @@ void RNA_def_camera(BlenderRNA *brna)
{CAM_PERSP, "PERSP", 0, "Perspective", ""},
{CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem prop_draw_type_extra_items[] = {
+ {CAM_DTX_CENTER, "CENTER", 0, "Center", ""},
+ {CAM_DTX_CENTER_DIAG, "CENTER_DIAGONAL", 0, "Center Diagonal", ""},
+ {CAM_DTX_THIRDS, "THIRDS", 0, "Thirds", ""},
+ {CAM_DTX_GOLDEN, "GOLDEN", 0, "Golden", ""},
+ {CAM_DTX_GOLDEN_DIAG_H, "GOLDEN_DIAGONAL_H", 0, "Golden Diagonal Hoz", ""},
+ {CAM_DTX_GOLDEN_DIAG_V, "GOLDEN_DIAGONAL_V", 0, "Golden Diagonal Vert", ""},
+ {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_lens_unit_items[] = {
{0, "MILLIMETERS", 0, "Millimeters", ""},
{CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
@@ -81,6 +89,13 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Camera types");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "show_guide", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "dtx");
+ RNA_def_property_enum_items(prop, prop_draw_type_extra_items);
+ RNA_def_property_flag(prop, PROP_ENUM_FLAG);
+ RNA_def_property_ui_text(prop, "Comosition Guide", "Draw overlay");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* Number values */