diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 16:15:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 16:15:22 +0400 |
commit | 62187c386ee22dc9c3bfa6fd60795ed510b4e529 (patch) | |
tree | aa156b02e695f9c9c745de592c122687f32cfe96 /source/blender/makesrna/intern/rna_space.c | |
parent | 7eaef1068dbec8dda48aadbed8c0e86e1245ad63 (diff) |
mask UI for space image
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 78811492cd4..c710831d421 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -563,6 +563,13 @@ static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value) ED_space_image_set(sima, sc->scene, sc->scene->obedit, (Image *)value.data); } +static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr, PointerRNA value) +{ + SpaceImage *sima = (SpaceImage *)(ptr->data); + + ED_space_image_set_mask(NULL, sima, (Mask *)value.data); +} + static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free) { @@ -1104,7 +1111,7 @@ static void rna_def_space(BlenderRNA *brna) } /* for all spaces that use a mask */ -void mask_space_info(StructRNA *srna, int noteflag, const char *mask_set_func) +void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *mask_set_func) { PropertyRNA *prop; @@ -1245,9 +1252,6 @@ static void rna_def_space_image_uv(BlenderRNA *brna) RNA_def_property_enum_items(prop, pivot_items); RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); - - /* mask */ - mask_space_info(srna, NC_SPACE | ND_SPACE_IMAGE, NULL); } static void rna_def_space_outliner(BlenderRNA *brna) @@ -2071,6 +2075,9 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties"); rna_def_space_image_uv(brna); + + /* mask */ + rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mask_set"); } static void rna_def_space_sequencer(BlenderRNA *brna) @@ -3099,7 +3106,7 @@ static void rna_def_space_clip(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); /* mask */ - mask_space_info(srna, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_mask_set"); + rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_mask_set"); /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); |