Open runette opened 3 years ago
problem is that none of the existing write drivers has capability to EDIT the existing mesh without recreating it from scratch. Therefore it is quite a big change to both API and drivers to allow new capability ("edit") and implement iit.
It feels to me like linking the API too closely to the underlying functions. Opening the mesh in edit mode, edit and then persist may indeed mean that the driver has to recreate the whole file (it does in most cases in life) but I am not sure I can see why that means that we have to reflect that at the MDAL API layer.
But the question is currently moot, since there are no drivers that can save both mesh and data.
But the question is currently moot, since there are no drivers that can save both mesh and data.
To be exact, Selafin driver can write mesh and dataset... but it is a very specific format...
But the question is currently moot, since there are no drivers that can save both mesh and data.
To be exact, Selafin driver can write mesh and dataset... but it is a very specific format...
True that. sorry.
The handing of edit modes in the C API needs to be improved:
For a Mesh - it is created in Edit Mode but loaded not in Edit Mode. So the only way to edit a mesh is to create a new mesh. This IS workable and kind of makes sense because it avoids the complexities of data validation when editing, for instance, the vertices of a mesh with DataOnVertices etc.
The case for DataGroup is less clear. At the moment it is similar - created in Edit Mode but loaded read only. However, since read only prevents you from overwriting the complete dataset or adding a timeslice to the data (both perfectly reasonable actions) I think that this is not a sensible choice. The API should have the option to open Edit Mode as well as close Edit Mode.
I will submit a separate PR with proposed changes.