Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <lichtwerk>2021-01-04 11:05:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-04 11:05:46 +0300
commit80e720ee4af4acff8f5fac768a9458e6e43a5cc0 (patch)
treed94a2170d6735ee3bdb351673e6e76f50300dd15 /source/blender/makesrna/intern/rna_image_api.c
parent14ee48d898e8cbe1a0be9899ea4d9d68cb3f1f04 (diff)
Fix T84191: remove python API limits for Image.scale() dimensions
Since the introduction in 2c23bb838979131667c922df1f01738e02e6ca16, these were set to 10000 each. This seems like an arbitrary limit (BKE_image_scale / IMB_scaleImBuf don't have limits and I couldn't spot similar size restrictions in image relating functions), now match what we do for creating images (rna_Main_images_new), use INT_MAX. Ref D9950
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index f93738838de..987517320f9 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -322,9 +322,9 @@ void RNA_api_image(StructRNA *srna)
func = RNA_def_function(srna, "scale", "rna_Image_scale");
RNA_def_function_ui_description(func, "Scale the image in pixels");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm = RNA_def_int(func, "width", 1, 1, 10000, "", "Width", 1, 10000);
+ parm = RNA_def_int(func, "width", 1, 1, INT_MAX, "", "Width", 1, INT_MAX);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_int(func, "height", 1, 1, 10000, "", "Height", 1, 10000);
+ parm = RNA_def_int(func, "height", 1, 1, INT_MAX, "", "Height", 1, INT_MAX);
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
func = RNA_def_function(srna, "gl_touch", "rna_Image_gl_touch");