[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41598] branches/soc-2011-tomato/source/ blender/editors: Camera tracking integration
Sergey Sharybin
g.ulairi at gmail.com
Sun Nov 6 19:40:13 CET 2011
Revision: 41598
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41598
Author: nazgul
Date: 2011-11-06 18:40:13 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
Camera tracking integration
===========================
- Fixed to incorrect users count for clip datablocks when performing some actions.
- Slight changes in used notifiers.
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c 2011-11-06 18:38:20 UTC (rev 41597)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c 2011-11-06 18:40:13 UTC (rev 41598)
@@ -52,6 +52,7 @@
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+#include "BKE_library.h"
#include "BKE_sound.h"
#include "WM_api.h"
@@ -1546,6 +1547,7 @@
BKE_reportf(op->reports, RPT_INFO, "Average reprojection error %.3f", error);
scene->clip= clip;
+ id_us_plus(&clip->id);
if(!scene->camera)
scene->camera= scene_find_camera(scene);
@@ -1562,8 +1564,11 @@
DAG_id_tag_update(&clip->id, 0);
WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ /* update active clip displayed in scene buttons */
+ WM_event_add_notifier(C, NC_SCENE, scene);
+
return OPERATOR_FINISHED;
}
Modified: branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c 2011-11-06 18:38:20 UTC (rev 41597)
+++ branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c 2011-11-06 18:40:13 UTC (rev 41598)
@@ -3017,7 +3017,8 @@
if(bgpic_rem) {
BLI_remlink(&vd->bgpicbase, bgpic_rem);
- if(bgpic_rem->ima) bgpic_rem->ima->id.us--;
+ if(bgpic_rem->ima) id_us_min(&bgpic_rem->ima->id);
+ if(bgpic_rem->clip) id_us_min(&bgpic_rem->clip->id);
MEM_freeN(bgpic_rem);
WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, vd);
return OPERATOR_FINISHED;
More information about the Bf-blender-cvs
mailing list