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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-03 23:17:12 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-03 23:17:12 +0300
commit8360dc066c7d12ec9b8e96ad399f23f9c873f691 (patch)
treeac75707c40050644248a1548c734ff3f141acc65 /source/blender/makesrna/intern/rna_camera.c
parenta9374c5941641b8f7322b6b2c7ad83892b5b214d (diff)
RNA
* Added a function to define booleans negative, to turn negative properties into positive ones gettin rid of the no_ prefix, and also got rid of the use_ prefix for two booleans. * Also made the function for enum bitflags separate, this is quite rare so don't need to bother with this in most cases. * Removed svn:executable flags from some files.
Diffstat (limited to 'source/blender/makesrna/intern/rna_camera.c')
-rw-r--r--source/blender/makesrna/intern/rna_camera.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index f5ee073b663..55fc5989fa8 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -43,6 +43,10 @@ void RNA_def_camera(BlenderRNA *brna)
{CAM_PERSP, "PERSP", "Perspective", ""},
{CAM_ORTHO, "ORTHO", "Orthographic", ""},
{0, NULL, NULL, NULL}};
+ static EnumPropertyItem prop_lens_unit_items[] = {
+ {0, "MILLIMETERS", "Millimeters", ""},
+ {CAM_ANGLETOGGLE, "DEGREES", "Degrees", ""},
+ {0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Camera", "ID", "Camera");
@@ -124,11 +128,12 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWNAME);
RNA_def_property_ui_text(prop, "Show Name", "Draw the active Camera's name in Camera view.");
- prop= RNA_def_property(srna, "use_degrees", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_ANGLETOGGLE);
- RNA_def_property_ui_text(prop, "Use Degrees", "Use degrees instead of mm as the unit of the Camera lens.");
+ prop= RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_lens_unit_items);
+ RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface.");
- /* Pointers */
+ /* pointers */
rna_def_ipo_common(srna);
prop= RNA_def_property(srna, "dof_object", PROP_POINTER, PROP_NONE);