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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-11-23 20:12:11 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-23 20:12:11 +0400
commit85497e35d0a012e8584022cfa021dd1b8435d17b (patch)
tree4262bec6539efdddc3e71d0fffe0e69f235db28d /source/blender/makesrna/intern/rna_space.c
parentf48cc83b3e7327565c17fc18f42881099941b4bf (diff)
Added method clear to most of collections which supports new/remove.
This method not added to animation-specific structures yet/
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 9f6f0bb7802..495a83f4bbe 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -911,6 +911,12 @@ static void rna_BackgroundImage_remove(View3D *v3d, ReportList *reports, BGpic *
}
}
+static void rna_BackgroundImage_clear(View3D *v3d)
+{
+ ED_view3D_background_image_clear(v3d);
+ WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
+}
+
/* Space Node Editor */
static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value)
@@ -1328,6 +1334,9 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+
+ func= RNA_def_function(srna, "clear", "rna_BackgroundImage_clear");
+ RNA_def_function_ui_description(func, "Remove all background images");
}
static void rna_def_space_view3d(BlenderRNA *brna)