diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-19 06:48:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-19 06:48:09 +0400 |
commit | 822d6ae037e0cce734916e88ed00fdbd811edae1 (patch) | |
tree | c3b37852984d864edae79696023a5bf1d6b2fd65 /source/blender | |
parent | f3613be1fbfd764d829188b56ac17a3987161a77 (diff) |
- rename MovieTrackingMarker.enabled --> mute, to match constraints/nla/fcurves/sequencer
- report an error if an invalid BGpic arg is given to v3d.background_images.remove()
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 6 |
2 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 393ffa69cbc..a33622cf8a1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -900,11 +900,15 @@ static BGpic *rna_BackgroundImage_new(View3D *v3d) return bgpic; } -static void rna_BackgroundImage_remove(View3D *v3d, BGpic *bgpic) +static void rna_BackgroundImage_remove(View3D *v3d, ReportList *reports, BGpic *bgpic) { - ED_view3D_background_image_remove(v3d, bgpic); - - WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d); + if (BLI_findindex(&v3d->bgpicbase, bgpic) == -1) { + BKE_report(reports, RPT_ERROR, "BackgroundImage can't be removed"); + } + else { + ED_view3D_background_image_remove(v3d, bgpic); + WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d); + } } /* Space Node Editor */ @@ -1321,6 +1325,7 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_BackgroundImage_remove"); RNA_def_function_ui_description(func, "Remove background image"); + 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); } diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 73b2914fba1..269860e1d7e 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -451,9 +451,9 @@ static void rna_def_trackingMarker(BlenderRNA *brna) RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); /* enable */ - prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MARKER_DISABLED); - RNA_def_property_ui_text(prop, "Enable", "Is marker enabled for current frame"); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MARKER_DISABLED); + RNA_def_property_ui_text(prop, "Mode", "Is marker muted for current frame"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); } |