diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-08-21 12:05:44 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-08-21 12:08:10 +0300 |
commit | 8f50cdd7d5cb43870add1b3e983fed92f84d864a (patch) | |
tree | 6b5038de3db4336aa9c02a2b9b8db184c629c09c /source/blender/makesrna/intern/rna_gpencil_modifier.c | |
parent | 6e8a76c96a61d716c02aab4a7ca2ac40d2ae63ff (diff) |
Fix T68943: GPencil Time modifier gets strange value in offset parameter
This is due a limitation in the RNA property when the range is too extreme. As we don't need that, the value was set to SHRT_MAX frames as maximum offset.
Also fixed the same problem in other modules of Grease Pencil.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 617b4eb7e4a..21eaaf9dd50 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -1023,7 +1023,7 @@ static void rna_def_modifier_gpenciltime(BlenderRNA *brna) prop = RNA_def_property(srna, "offset", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "offset"); - RNA_def_property_range(prop, -INT_MAX, INT_MAX); + RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX); RNA_def_property_ui_text( prop, "Frame Offset", "Number of frames to offset original keyframe number or frame to fix"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); @@ -1256,7 +1256,7 @@ static void rna_def_modifier_gpencilinstance(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "count", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 1, INT_MAX); + RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 50, 1, -1); RNA_def_property_ui_text(prop, "Count", "Number of items"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); @@ -1321,7 +1321,7 @@ static void rna_def_modifier_gpencilinstance(BlenderRNA *brna) prop = RNA_def_property(srna, "replace_material", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "mat_rpl"); - RNA_def_property_range(prop, 0, INT_MAX); + RNA_def_property_range(prop, 0, SHRT_MAX); RNA_def_property_ui_text( prop, "Material", |