[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26739] trunk/blender/source/blender/ makesrna/intern/rna_camera.c: Adding soft limits and better hard limits to relevant camera properties

Daniel Salazar zanqdo at gmail.com
Tue Feb 9 17:05:12 CET 2010


Revision: 26739
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26739
Author:   zanqdo
Date:     2010-02-09 17:05:12 +0100 (Tue, 09 Feb 2010)

Log Message:
-----------
Adding soft limits and better hard limits to relevant camera properties

wohooo first commit! :D

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_camera.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_camera.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_camera.c	2010-02-09 15:48:34 UTC (rev 26738)
+++ trunk/blender/source/blender/makesrna/intern/rna_camera.c	2010-02-09 16:05:12 UTC (rev 26739)
@@ -116,7 +116,7 @@
 
 	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 @@
 
 	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);
 





More information about the Bf-blender-cvs mailing list