diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 17:05:22 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 17:05:36 +0300 |
commit | fe03bc2a02a0c9e5ecd554f72839ae0a407a8e86 (patch) | |
tree | a361542041b14b6e40f89e49c5a07bf5e3c0105f /source/blender/makesrna/intern/rna_space.c | |
parent | 32482aadb8ecc4c2d1f2dd73124d1b94f0febe57 (diff) |
Support rotation and flipping for background images, patch by Andre D.
(T34583) with minor changes. Thanks for the patch!
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ff9df16ae94..7eaf7376a4b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1700,7 +1700,22 @@ static void rna_def_background_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image"); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + + prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER); + RNA_def_property_float_sdna(prop, NULL, "rotation"); + RNA_def_property_ui_text(prop, "Rotation", "Rotation for the background image"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "flip_h", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_H); + RNA_def_property_ui_text(prop, "Flip Horizontally", "Flip the background image horizontally"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "flip_v", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_V); + RNA_def_property_ui_text(prop, "Flip Vertically", "Flip the background image vertically"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "blend"); RNA_def_property_float_funcs(prop, "rna_BackgroundImage_opacity_get", "rna_BackgroundImage_opacity_set", NULL); |