Camera linking broken

I’m not able to get the dual 3D views to link correctly in the nightly version of Slicer. The link/unlink button links the zoom, but not rotation and translation.

I tested an older nightly from 4-17, and it was broken in this version also. Linking is working in Slicer 4.10.2.

Hi @smrolfe -

I’ve been debugging this and hope to find a fix. In the mean time I noticed that while the camera view linkage doesn’t happen on normal mouse interaction events, it does happen when you use the mouse wheel to scroll in or out. You could use this as a workaround if it helps while a better fix is in the works.

1 Like

Proposed fix here:

1 Like

It won’t fix all camera linking use cases, but I went ahead and committed the fix because I think it will address the SlicerMorph use case. @smrolfe can you try and let me know?

Thanks @pieper, I’ll try this and report back.

Hi @pieper, this fix works perfectly for me, thanks!

1 Like

That’s great @smrolfe :+1:

Referring to @lassoan’s point in the pull request thread, I suspect there are still some issues loading/restoring scenes with linked 3D views, possibly because of some kind of race condition about when the observers are added. Let’s keep our eyes open for any lingering issues.

1 Like

Currently, linked views cannot be restored from an MRB scene file. I posted on this a while ago here.

This issue is related to the cameras loaded from the MRB scene file and I can manually fix it by deleting the extra cameras loaded with the scene file. Is there another use case where these cameras are needed?

Thanks for pointing out the other issue - sorry it fell through the cracks. I haven’t looked lately, but in the past there were cases cameras were being created automatically as the scene is being read, and that could explain what we are seeing here. Do you think that issue is in the critical path for SlicerMorph?

Thanks @pieper. We were interested in using MRB files to package our sample data, but we found a work-around. So it’s not a priority for us now.

1 Like