[Bf-blender-cvs] [9564b6cf238] master: Fix T90651: camera reconstruction crash without scene camera

Philipp Oeser noreply at git.blender.org
Mon Aug 23 12:58:30 CEST 2021


Commit: 9564b6cf2388fc869608f32a77cbc18032810e58
Author: Philipp Oeser
Date:   Mon Aug 16 08:38:15 2021 +0200
Branches: master
https://developer.blender.org/rB9564b6cf2388fc869608f32a77cbc18032810e58

Fix T90651: camera reconstruction crash without scene camera

This was working differently in 2.79, tried tracking this down and it
seems this was wrong since the 2.8 beginning in {rB7907dfc40018}.

This would not only crash without an active scene camera, but would also
result in different tracks from different camera's constraints could not
be selected.

So select id depends on corresponding camera, remove the dependency on
scene camera completely.

Maniphest Tasks: T90651

Differential Revision: https://developer.blender.org/D12230

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

M	source/blender/draw/engines/overlay/overlay_extra.c

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

diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c
index 2a9080eb217..04d90919a20 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.c
+++ b/source/blender/draw/engines/overlay/overlay_extra.c
@@ -864,7 +864,6 @@ typedef union OVERLAY_CameraInstanceData {
 static void camera_view3d_reconstruction(OVERLAY_ExtraCallBuffers *cb,
                                          Scene *scene,
                                          View3D *v3d,
-                                         Object *camera_object,
                                          Object *ob,
                                          const float color[4])
 {
@@ -943,7 +942,7 @@ static void camera_view3d_reconstruction(OVERLAY_ExtraCallBuffers *cb,
       }
 
       if (is_select) {
-        DRW_select_load_id(camera_object->runtime.select_id | (track_index << 16));
+        DRW_select_load_id(ob->runtime.select_id | (track_index << 16));
         track_index++;
       }
 
@@ -1251,7 +1250,7 @@ void OVERLAY_camera_cache_populate(OVERLAY_Data *vedata, Object *ob)
 
   /* Motion Tracking. */
   if ((v3d->flag2 & V3D_SHOW_RECONSTRUCTION) != 0) {
-    camera_view3d_reconstruction(cb, scene, v3d, camera_object, ob, color_p);
+    camera_view3d_reconstruction(cb, scene, v3d, ob, color_p);
   }
 
   /* Background images. */



More information about the Bf-blender-cvs mailing list