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:
authorDaniel Salazar <zanqdo@gmail.com>2010-02-09 19:05:12 +0300
committerDaniel Salazar <zanqdo@gmail.com>2010-02-09 19:05:12 +0300
commitd5b3db4deb4d06bac45d8a1a90f7cfa04fda3ac4 (patch)
treee2fb44e6ba05eff6832d7ca6d881762f3b598b85
parentf082c7be05cdcf0de8e3140eb0d5ee8013fba576 (diff)
Adding soft limits and better hard limits to relevant camera properties
wohooo first commit! :D
-rw-r--r--source/blender/makesrna/intern/rna_camera.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 3cf86f02d69..30420d72bfb 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -116,7 +116,7 @@ void RNA_def_camera(BlenderRNA *brna)
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
- RNA_def_property_range(prop, 1.0f, 250.0f);
+ RNA_def_property_range(prop, 1.0f, 500.0f);
RNA_def_property_ui_text(prop, "Lens", "Perspective Camera lens value in mm.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_lens_update");
@@ -128,19 +128,22 @@ void RNA_def_camera(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drawsize");
- RNA_def_property_range(prop, 0.1f, 10.0f);
+ RNA_def_property_range(prop, 0.1f, 1000.0f);
+ RNA_def_property_ui_range(prop, 0.01, 100, 1, 1);
RNA_def_property_ui_text(prop, "Draw Size", "Apparent size of the Camera object in the 3D View.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "shift_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shiftx");
- RNA_def_property_range(prop, -2.0f, 2.0f);
+ RNA_def_property_range(prop, -10.0f, 10.0f);
+ RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shifty");
- RNA_def_property_range(prop, -2.0f, 2.0f);
+ RNA_def_property_range(prop, -10.0f, 10.0f);
+ RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);