[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53464] trunk/blender: Some minor cleanup in camera's FOV angle props (mostly use DEG2RAD macro, and remove reference to degrees in tips - user is free to use radians if he prefers! ).
Bastien Montagne
montagne29 at wanadoo.fr
Mon Dec 31 15:52:55 CET 2012
Revision: 53464
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53464
Author: mont29
Date: 2012-12-31 14:52:55 +0000 (Mon, 31 Dec 2012)
Log Message:
-----------
Some minor cleanup in camera's FOV angle props (mostly use DEG2RAD macro, and remove reference to degrees in tips - user is free to use radians if he prefers!).
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py
trunk/blender/source/blender/makesrna/intern/rna_camera.c
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py 2012-12-31 14:49:27 UTC (rev 53463)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py 2012-12-31 14:52:55 UTC (rev 53464)
@@ -80,7 +80,7 @@
row = col.row()
if cam.lens_unit == 'MILLIMETERS':
row.prop(cam, "lens")
- elif cam.lens_unit == 'DEGREES':
+ elif cam.lens_unit == 'FOV':
row.prop(cam, "angle")
row.prop(cam, "lens_unit", text="")
Modified: trunk/blender/source/blender/makesrna/intern/rna_camera.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_camera.c 2012-12-31 14:49:27 UTC (rev 53463)
+++ trunk/blender/source/blender/makesrna/intern/rna_camera.c 2012-12-31 14:52:55 UTC (rev 53464)
@@ -112,8 +112,8 @@
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_lens_unit_items[] = {
- {0, "MILLIMETERS", 0, "Millimeters", ""},
- {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
+ {0, "MILLIMETERS", 0, "Millimeters", "Specify the lens in millimeters"},
+ {CAM_ANGLETOGGLE, "FOV", 0, "Field of View", "Specify the lens as the field of view's angle"},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem sensor_fit_items[] = {
@@ -154,23 +154,23 @@
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "angle_x", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_range(prop, M_PI * (0.367 / 180.0), M_PI * (172.847 / 180.0));
+ RNA_def_property_range(prop, DEG2RAD(0.367), DEG2RAD(172.847));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Horizontal FOV", "Camera lens horizontal field of view in degrees");
+ RNA_def_property_ui_text(prop, "Horizontal FOV", "Camera lens horizontal field of view");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_x_get", "rna_Camera_angle_x_set", NULL);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
prop = RNA_def_property(srna, "angle_y", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_range(prop, M_PI * (0.367 / 180.0), M_PI * (172.847 / 180.0));
+ RNA_def_property_range(prop, DEG2RAD(0.367), DEG2RAD(172.847));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Vertical FOV", "Camera lens vertical field of view in degrees");
+ RNA_def_property_ui_text(prop, "Vertical FOV", "Camera lens vertical field of view");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_y_get", "rna_Camera_angle_y_set", NULL);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_range(prop, M_PI * (0.367 / 180.0), M_PI * (172.847 / 180.0));
+ RNA_def_property_range(prop, DEG2RAD(0.367), DEG2RAD(172.847));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Field of View", "Camera lens field of view in degrees");
+ RNA_def_property_ui_text(prop, "Field of View", "Camera lens field of view");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_get", "rna_Camera_angle_set", NULL);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
More information about the Bf-blender-cvs
mailing list