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

Joshua Leung noreply at git.blender.org
Wed Jun 8 21:51:25 CEST 2016


Commit: f6e33c2ec9cb6ecb482e2c2a8131bf2e6a3390da
Author: Joshua Leung
Date:   Mon May 30 23:45:19 2016 +1200
Branches: compositor-2016
https://developer.blender.org/rBf6e33c2ec9cb6ecb482e2c2a8131bf2e6a3390da

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