Disable automatic scene view generation on save

Currently, a scene view is added on each scene save, which approximately doubles the scene file size, which may be significant when the scene has hundreds of nodes.

Also, each time when the scene file is loaded and the re-saved one more scene view is added.

Can I go ahead and remove automatic scene view generation on scene save?

3 Likes

Sounds good to me.

Could you add an option like includeSceneView (or similar name) ?

Such option could be passed as a property to

Also function saveDefaultSceneView would be a no-op with such property is set to 1

Ideally, the option would also show up in the data dialog

1 Like

Yes, adding the sceneview automatically hasn’t turned out to have a lot of utility. It also make it difficult if you have to inspect the mrml file for any reason. +1 for turning that feature off by default (and while I agree with Jc that a gui option to reenable it would be ideal, I’d be okay with turning it off even if the gui weren’t added).

I’d be okay with turning it off even if the gui weren’t added

Sounds good. Availability from python is sufficient

Should the MRB always be done including scene view then ?

I don’t think the sceneviews add anything extra in the mrb case compared to the mrml case, so no, I wouldn’t.

The sceneview does create a screen capture and that could be useful to have if one wanted to have a thumbnail for browsing scenes, like in an open dialog (but we’ve never done that so I’m not sure it’s a valid use case).

Does this mean that it will not be possible to save MRB like this one: http://slicer.kitware.com/midas3/slicerdatastore/view?itemId=121588&layout=layout

That would be a pity

The only difference would be that you would not get the master scene view at the end of that list. The ones you make explicitly would still be there.

But it’s true that if you didn’t make scene views explicitly there wouldn’t be any in the data store.

The only difference would be that if you needed a scene view then you would need to click on the “Create scene view” button + click OK (two extra clicks) before you save the scene.

I find that these automatically created scene views are more distracting for me than helpful, as they clutter the scene view list.

We can save a screenshot independently of scene views when the scene is saved to enable quick preview without loading the scene.

Thanks for your patience and for the clarification. The propose change make complete sense. :+1:

automatically created scene views are more distracting for me than helpful,

agreed. Explicit is better than implicit in that case

We can save a screenshot independently of scene views when the scene is saved to enable quick preview without loading the scene.

:+1:

If I load an mrb, do I get the same look/ configuration like when I saved the mrb?

1 Like

Yes. The loaded scene will look exactly like the scene looked at the time of saving.

Automatic sceneview creation might have been implemented just because of the screenshot. Storing state of all nodes in scene view is redundant, because that information is already stored in the main scene.

Hi,
thanks for the explanation. Preserving the ability to restore the state was the functionality I was concerned about.
Best
Ron

1 Like

Yes I think if this small feature is added to scene saving instead of the scene view capture, then we won’t lose anything by removing the automatic scene views.

I’ve implemented replaced automatic scene view saving by automatic screenshot saving. I wanted to send a pull request but accidently pushed it directly - see changes here. Let me know if you have any comments, I’ll address them in follow-up commits.

2 Likes