[Bf-blender-cvs] [5bee553b1f] blender2.8: Update get_camera_with_movieclip

Dalai Felinto noreply at git.blender.org
Thu Feb 9 15:57:17 CET 2017


Commit: 5bee553b1f38319da9f88ca2d9e7150d6448eaf5
Author: Dalai Felinto
Date:   Thu Feb 9 15:51:30 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB5bee553b1f38319da9f88ca2d9e7150d6448eaf5

Update get_camera_with_movieclip

===================================================================

M	source/blender/editors/space_clip/tracking_ops_orient.c

===================================================================

diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c
index 7fe73f8d0b..f05122e302 100644
--- a/source/blender/editors/space_clip/tracking_ops_orient.c
+++ b/source/blender/editors/space_clip/tracking_ops_orient.c
@@ -44,6 +44,7 @@
 #include "BKE_tracking.h"
 #include "BKE_global.h"
 #include "BKE_depsgraph.h"
+#include "BKE_layer.h"
 #include "BKE_object.h"
 #include "BKE_report.h"
 
@@ -69,17 +70,17 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
 		return camera;
 	}
 
-	for (BaseLegacy *base = scene->base.first;
-	     base != NULL;
-	     base = base->next)
+	Object *ob;
+	FOREACH_SCENE_OBJECT(scene, ob)
 	{
-		if (base->object->type == OB_CAMERA) {
-			if (BKE_object_movieclip_get(scene, base->object, false) == clip) {
-				camera = base->object;
+		if (ob->type == OB_CAMERA) {
+			if (BKE_object_movieclip_get(scene, ob, false) == clip) {
+				camera = ob;
 				break;
 			}
 		}
 	}
+	FOREACH_SCENE_OBJECT_END
 
 	return camera;
 }




More information about the Bf-blender-cvs mailing list