Revision: 19684
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19684
Author:   ton
Date:     2009-04-12 19:28:41 +0200 (Sun, 12 Apr 2009)

Log Message:
-----------
2.5

Patch provided by Thomas (DingTo). Fixes min/max limits in rna.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_image.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_lamp.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_world.c

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_image.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_image.c      
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_image.c      
2009-04-12 17:28:41 UTC (rev 19684)
@@ -158,12 +158,12 @@
 
        prop= RNA_def_property(srna, "generated_width", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "gen_x");
-       RNA_def_property_range(prop, 1, 5000);
+       RNA_def_property_range(prop, 1, 16384);
        RNA_def_property_ui_text(prop, "Generated Width", "Generated image 
width.");
 
        prop= RNA_def_property(srna, "generated_height", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "gen_y");
-       RNA_def_property_range(prop, 1, 5000);
+       RNA_def_property_range(prop, 1, 16384);
        RNA_def_property_ui_text(prop, "Generated Height", "Generated image 
height.");
 
        /* realtime properties */

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_lamp.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_lamp.c       
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_lamp.c       
2009-04-12 17:28:41 UTC (rev 19684)
@@ -189,7 +189,7 @@
        RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
 
        prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, 
PROP_NONE);
-       RNA_def_property_range(prop, 0.0f, 1.0f);
+       RNA_def_property_range(prop, -1.0f, 1.0f);
        RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered 
light.");
        RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
 
@@ -200,7 +200,7 @@
 
        prop= RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
-       RNA_def_property_range(prop, 0.0f, 30.0f);
+       RNA_def_property_range(prop, 1.0f, 30.0f);
        RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky 
turbidity.");
        RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
 
@@ -270,7 +270,7 @@
 
        prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "dist");
-       RNA_def_property_range(prop, 0.0f, 9999.0f);
+       RNA_def_property_range(prop, 0.01f, 5000.0f);
        RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the 
light is at half the original intensity at this point.");
        RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
 

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c      
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c      
2009-04-12 17:28:41 UTC (rev 19684)
@@ -212,13 +212,13 @@
        
        prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "xsch");
-       RNA_def_property_range(prop, 0, 10000);
+       RNA_def_property_range(prop, 4, 10000);
        RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal 
pixels in the rendered image.");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
        
        prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "ysch");
-       RNA_def_property_range(prop, 0, 10000);
+       RNA_def_property_range(prop, 4, 10000);
        RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical 
pixels in the rendered image.");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
        

Modified: 
branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c    
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c    
2009-04-12 17:28:41 UTC (rev 19684)
@@ -311,8 +311,8 @@
        prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "clipend");
        RNA_def_property_range(prop, 0.01, FLT_MAX);
-       RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
-       RNA_def_property_ui_text(prop, "Clip Start", "Objects further than this 
are not visible to map.");
+       RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
+       RNA_def_property_ui_text(prop, "Clip End", "Objects further than this 
are not visible to map.");
 
        prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "viewscale");
@@ -621,7 +621,6 @@
 static void rna_def_texture_noise(BlenderRNA *brna)
 {
        StructRNA *srna;
-       PropertyRNA *prop;
 
        srna= RNA_def_struct(brna, "NoiseTexture", "Texture");
        RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise 
texture.");
@@ -680,23 +679,23 @@
        prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
        RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for 
normal mapping");
-
-       /* XXX: mtex->normapspace "Sets space of normal map image" "Normal 
Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3" 
-        *                      not sure why this goes in mtex instead of 
texture directly? */
 
+       /* XXX: mtex->normapspace "Sets space of normal map image" "Normal 
Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3" 
+        *                      not sure why this goes in mtex instead of 
texture directly? */
+
        prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "extend");
        RNA_def_property_enum_items(prop, prop_image_extension);
-       RNA_def_property_ui_text(prop, "Extension", "Sets how the image is 
stretched in the texture");
+       RNA_def_property_ui_text(prop, "Extension", "Sets how the image is 
stretched in the texture");
 
        prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "xrepeat");
-       RNA_def_property_range(prop, 0, 512);
+       RNA_def_property_range(prop, 1, 512);
        RNA_def_property_ui_text(prop, "Repeat X", "Sets a repetition 
multiplier in the X direction");
 
        prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "yrepeat");
-       RNA_def_property_range(prop, 0, 512);
+       RNA_def_property_range(prop, 1, 512);
        RNA_def_property_ui_text(prop, "Repeat Y", "Sets a repetition 
multiplier in the Y direction");
 
        prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE);
@@ -767,7 +766,6 @@
 static void rna_def_texture_plugin(BlenderRNA *brna)
 {
        StructRNA *srna;
-       PropertyRNA *prop;
 
        srna= RNA_def_struct(brna, "PluginTexture", "Texture");
        RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture.");
@@ -915,7 +913,7 @@
 
        prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
-       RNA_def_property_range(prop, 0, 10);
+       RNA_def_property_range(prop, 0.01, 10);
        RNA_def_property_ui_text(prop, "Noise Intensity", "");
 
        prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);

Modified: 
branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c    
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c    
2009-04-12 17:28:41 UTC (rev 19684)
@@ -257,7 +257,7 @@
        RNA_def_property_ui_text(prop, "Vertex Select", "");
 
        prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
-       RNA_def_property_range(prop, 0, 255);
+       RNA_def_property_range(prop, 1, 10);
        RNA_def_property_ui_text(prop, "Vertex Size", "");
 }
 
@@ -299,7 +299,7 @@
        RNA_def_property_ui_text(prop, "Face Dot Selected", "");
 
        prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
-       RNA_def_property_range(prop, 0, 255);
+       RNA_def_property_range(prop, 1, 10);
        RNA_def_property_ui_text(prop, "Face Dot Size", "");
 }
 
@@ -1306,12 +1306,12 @@
 
        prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
-       RNA_def_property_range(prop, 4, 10);
+       RNA_def_property_range(prop, 0, 200);
        RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning 
speed of an NDOF device, as percent of standard.");
 
        prop= RNA_def_property(srna, "ndof_rotate_speed", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "ndof_rotate");
-       RNA_def_property_range(prop, 4, 10);
+       RNA_def_property_range(prop, 0, 200);
        RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall 
rotation speed of an NDOF device, as percent of standard.");
 }
 
@@ -1563,7 +1563,7 @@
 
        prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "savetime");
-       RNA_def_property_range(prop, 0, 32);
+       RNA_def_property_range(prop, 1, 60);
        RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) 
to wait between automatic temporary saves.");
 
        prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_world.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_world.c      
2009-04-12 17:28:16 UTC (rev 19683)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_world.c      
2009-04-12 17:28:41 UTC (rev 19684)
@@ -186,7 +186,7 @@
 
        prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
-       RNA_def_property_range(prop, 0.0001, 1);
+       RNA_def_property_range(prop, 0.0001, 10);
        RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are 
slower and higher quality (for Approximate).");
 
        prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
@@ -204,7 +204,7 @@
 
        prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "aosamp");
-       RNA_def_property_range(prop, 0, 1);
+       RNA_def_property_range(prop, 1, 32);
        RNA_def_property_ui_text(prop, "Samples", "");
 

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to