Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The C API is not complete around Edit Modes #365

Open
runette opened this issue Jun 27, 2021 · 4 comments
Open

The C API is not complete around Edit Modes #365

runette opened this issue Jun 27, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@runette
Copy link
Contributor

runette commented Jun 27, 2021

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.

@PeterPetrik PeterPetrik added the enhancement New feature or request label Jul 13, 2021
@PeterPetrik
Copy link
Contributor

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.

@runette
Copy link
Contributor Author

runette commented Jul 13, 2021

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.

@vcloarec
Copy link
Collaborator

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...

@runette
Copy link
Contributor Author

runette commented Jul 14, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants