[Bf-blender-cvs] [82ceab5] master: Fix invalid RNA limits

Campbell Barton noreply at git.blender.org
Mon Jul 28 09:48:42 CEST 2014


Commit: 82ceab593cc122ef226bb945ff8e9719016ca525
Author: Campbell Barton
Date:   Mon Jul 28 17:47:06 2014 +1000
Branches: master
https://developer.blender.org/rB82ceab593cc122ef226bb945ff8e9719016ca525

Fix invalid RNA limits

===================================================================

M	source/blender/makesrna/intern/rna_material.c
M	source/blender/makesrna/intern/rna_particle.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 5cbbb2b..70da4ab 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -2236,12 +2236,12 @@ void rna_def_texpaint_slots(BlenderRNA *brna, StructRNA *srna)
 	RNA_def_property_ui_text(prop, "Texture Slots", "Texture slots defining the mapping and influence of textures");
 
 	prop = RNA_def_property(srna, "paint_active_slot", PROP_INT, PROP_UNSIGNED);
-	RNA_def_property_range(prop, 0, INT_MAX);
+	RNA_def_property_range(prop, 0, SHRT_MAX);
 	RNA_def_property_ui_text(prop, "Active Paint Texture Index", "Index of active texture paint slot");
 	RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, "rna_Material_active_paint_texture_index_update");
 
 	prop = RNA_def_property(srna, "paint_clone_slot", PROP_INT, PROP_UNSIGNED);
-	RNA_def_property_range(prop, 0, INT_MAX);
+	RNA_def_property_range(prop, 0, SHRT_MAX);
 	RNA_def_property_ui_text(prop, "Clone Paint Texture Index", "Index of clone texture paint slot");
 	RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, NULL);
 }
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index fe5bab3..0e56b18 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -2439,7 +2439,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
 
 	prop = RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_PIXEL);
 	RNA_def_property_int_sdna(prop, NULL, "simplify_refsize");
-	RNA_def_property_range(prop, 1, 32768);
+	RNA_def_property_range(prop, 1, SHRT_MAX);
 	RNA_def_property_ui_text(prop, "Reference Size", "Reference size in pixels, after which simplification begins");
 
 	prop = RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE);




More information about the Bf-blender-cvs mailing list