diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-09 17:51:30 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-09 17:51:30 +0300 |
commit | 5bee553b1f38319da9f88ca2d9e7150d6448eaf5 (patch) | |
tree | 2196f78e77aa056649530ce3bf1fb2dfe308b975 | |
parent | ff4dc7abfad6f4dc0f14ae158544f69ee981b7fe (diff) |
Update get_camera_with_movieclip
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_orient.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index 7fe73f8d0b4..f05122e3020 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; } |