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:
authorCampbell Barton <ideasman42@gmail.com>2011-01-11 13:00:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-11 13:00:21 +0300
commit8d385404ab0aefd38190f1e6844240c4eb5b267d (patch)
tree698c1fc6898ec6a1db5208a6c6ade34255fd831e /source/blender/editors/animation
parentca3d4052de2b26d4f3f15c4786794e619ffeef26 (diff)
bugfix [#25542] do not work? "Bind camera to Markers"
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_markers.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 37943b26827..32380af6a1d 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1321,27 +1321,20 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot)
#ifdef DURIAN_CAMERA_SWITCH
/* ******************************* camera bind marker ***************** */
-/* remove selected TimeMarkers */
static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
ListBase *markers= ED_context_get_markers(C);
TimeMarker *marker;
- short changed= 0;
- if(markers == NULL)
+ marker= ED_markers_get_first_selected(markers);
+ if(marker == NULL)
return OPERATOR_CANCELLED;
- for(marker= markers->first; marker; marker= marker->next) {
- if(marker->flag & SELECT) {
- marker->camera= scene->camera;
- }
- }
+ marker->camera= scene->camera;
- if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
- WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
- }
+ WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
+ WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
return OPERATOR_FINISHED;
}