diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-26 15:30:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-26 15:30:16 +0400 |
commit | 0d488c5580502575d2a1c24465aa3eaa4ad49cfc (patch) | |
tree | 2020b15c6fd656b8800535440255f2e91e53fc77 /source/blender/makesrna/intern/rna_modifier.c | |
parent | 708622c7f20e206ab18ffb56db8b78c319916eda (diff) |
add subsurf limits, in RNA, there were none, but subsurf would assert at 29.
Checked and subsurf level 11 gives over 3 million faces from a single triangle. So use this as a limit.
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index ef997ab1fd9..29eb967e3ce 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -793,14 +793,17 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna) rna_def_property_subdivision_common(srna, "subdivType"); + /* see CCGSUBSURF_LEVEL_MAX for max limit */ prop = RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "levels"); + RNA_def_property_range(prop, 0, 11); RNA_def_property_ui_range(prop, 0, 6, 1, -1); RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "renderLevels"); + RNA_def_property_range(prop, 0, 11); RNA_def_property_ui_range(prop, 0, 6, 1, -1); RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering"); |