[Bf-blender-cvs] [ce13a7b] master: Fix: Add a hard upper limit for fontsize of Text Strip's text

Joshua Leung noreply at git.blender.org
Mon May 30 13:49:02 CEST 2016


Commit: ce13a7b6095f682ced6c2bda6c4768b6dee2d30e
Author: Joshua Leung
Date:   Mon May 30 23:45:19 2016 +1200
Branches: master
https://developer.blender.org/rBce13a7b6095f682ced6c2bda6c4768b6dee2d30e

Fix: Add a hard upper limit for fontsize of Text Strip's text

Although there is a "UI limit", it's necessary to have the hard limit on the
property too. I noticed this bug first hand just now, when, after accidentally
setting the size to 8188 (due to a combination of typos and sluggish UI refresh)
my machine locked up completely when trying to jump to that frame. It got so bad
that I had to do a hard reset to fix it - so, it's possible that even 1000 or 2000
as used now are actually way too large still.

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

M	source/blender/makesrna/intern/rna_sequencer.c

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

diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 68d4f7f..c3a6605 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -2327,6 +2327,7 @@ static void rna_def_text(StructRNA *srna)
 	prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_UNSIGNED);
 	RNA_def_property_int_sdna(prop, NULL, "text_size");
 	RNA_def_property_ui_text(prop, "Size", "Size of the text");
+	RNA_def_property_range(prop, 0.0, 2000);
 	RNA_def_property_ui_range(prop, 0.0f, 1000, 1, -1);
 	RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");




More information about the Bf-blender-cvs mailing list