diff options
author | Scott Petrovic <scottpetrovic@gmail.com> | 2013-12-12 21:39:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-12 21:40:30 +0400 |
commit | c701082a928b4390f1fb910f2eb7520b45b4cdf1 (patch) | |
tree | f4112628d42741beec4b3922a6fdac7811c7949a /source/blender/editors/space_image/image_ops.c | |
parent | 6c96535fd887c96cd013812d53085b28a5203d5a (diff) |
RNA: Add pixels property type
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 2ea77bba681..bda4be40c5c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1837,8 +1837,10 @@ void IMAGE_OT_new(wmOperatorType *ot) /* properties */ RNA_def_string(ot->srna, "name", IMA_DEF_NAME, MAX_ID_NAME - 2, "Name", "Image datablock name"); - RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width", 1, 16384); - RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height", 1, 16384); + prop = RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width", 1, 16384); + RNA_def_property_subtype(prop, PROP_PIXEL); + prop = RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height", 1, 16384); + RNA_def_property_subtype(prop, PROP_PIXEL); prop = RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color", 0.0f, 1.0f); RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); RNA_def_property_float_array_default(prop, default_color); |