clicketyclackety / Crash

A multi-user implementation of Rhino3d
MIT License
37 stars 5 forks source link

Closing a model without releasing leaves temporary geometry stranded in the database #17

Closed clicketyclackety closed 1 year ago

clicketyclackety commented 1 year ago

Describe the bug Closing a model without releasing or deleting items leaves temporary items in the server. These items are then effectively released on next open.

To Reproduce Steps to reproduce the behavior:

  1. Start a local server
  2. Create some geometry
  3. Exit the model without saving or releasing
  4. Open a new model
  5. Open the local server

Expected behaviour Geometry that was not released should not be added to anyone's documents on reconnect.

Version Info (please complete the following information):

Additional context This bug raises a few questions. Does Crash keep old geometry as a kind of save state so that users can reconnect and start working on it later? This would mean that work in progress geometry in a crash model can be left and picked up on other machines which opens a lot of quite fantastic possibilities. Or, does Crash delete and dump any temporary geometry when a user disconnects without saving?

If a user were to just leave geometry data stranded in a model it would essentially be clutter until they reconnected and deleted it.

clicketyclackety commented 1 year ago

I'd love your take on this @cwensley 😊

cwensley commented 1 year ago

I think the end goal should be to persist all of the temporary geometry ideally so someone can reconnect and start off where they were before.

I think what's going wrong here is that when you connect the OnInitialize is baking everything instead of looking at the Temporary and Owner properties and place those in the local dictionaries to render them via the display conduit.

clicketyclackety commented 1 year ago

Thanks @cwensley . What you've said makes a lot of sense. It seems it'd be easier and better on Initialise to only bake all released geometry and user specific temporary geometry. That way Every change is saved and can be accessed from anywhere.

I'll see if I can't include this improvent in the Speck improvement PR.