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
This commit is contained in:
parent
0682af0d63
commit
9564b6cf23
Notes:
blender-bot
2023-02-14 01:21:16 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #90651, Crash selecting 3D tracking marker Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue