[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38086] trunk/blender/source/blender/ editors/animation/anim_markers.c: bind marker camera now uses active object rather then scene camera ( was requested a few times)
Campbell Barton
ideasman42 at gmail.com
Mon Jul 4 17:09:03 CEST 2011
Revision: 38086
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38086
Author: campbellbarton
Date: 2011-07-04 15:09:02 +0000 (Mon, 04 Jul 2011)
Log Message:
-----------
bind marker camera now uses active object rather then scene camera (was requested a few times)
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_markers.c
Modified: trunk/blender/source/blender/editors/animation/anim_markers.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_markers.c 2011-07-04 13:48:18 UTC (rev 38085)
+++ trunk/blender/source/blender/editors/animation/anim_markers.c 2011-07-04 15:09:02 UTC (rev 38086)
@@ -50,6 +50,7 @@
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+#include "BKE_screen.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -1416,7 +1417,9 @@
static int ed_marker_camera_bind_exec(bContext *C, wmOperator *UNUSED(op))
{
+ bScreen *sc= CTX_wm_screen(C);
Scene *scene= CTX_data_scene(C);
+ Object *ob = CTX_data_active_object(C);
ListBase *markers= ED_context_get_markers(C);
TimeMarker *marker;
@@ -1424,10 +1427,15 @@
if(marker == NULL)
return OPERATOR_CANCELLED;
- marker->camera= scene->camera;
+ marker->camera= ob;
+ /* camera may have changes */
+ scene_camera_switch_update(scene);
+ BKE_screen_view3d_scene_sync(sc);
+
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|NA_EDITED, scene); /* so we get view3d redraws */
return OPERATOR_FINISHED;
}
More information about the Bf-blender-cvs
mailing list