-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix setting of texture coordinates #317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Thanks for opening your first pull request in GemGIS! 🚀 Please make sure you read the Contributing Guide and follow the Code of Conduct. A few things to keep in mind:
- Remember to run the tests locally to make debugging issues easier.
- If you need help writing tests, take a look at the existing ones for inspiration. If you do not know where to start, let us know and we will walk you through it.
- All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.
- No matter what, we are really grateful that you put in the effort to open this PR!
if pv._version.version_info < (0, 43): | ||
surface.active_t_coords = uv | ||
else: | ||
surface.active_texture_coordinates = uv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to add a third condition if the version is whenever t_coords
was supported, but honestly that version of PyVista is not supported these days and this should use the modern API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@banesullivan thanks for looking into that. I did not realize that the error was on my side during the mesh generation! I would actually keep it to the latest version of PyVista! If you don't mind just changing the old line 509 to what you have written in the new line 514 now (surface.active_texture_coordinates = uv
), then I would be happy to merge it :)
Within the framework of the PyOpenSci Review, I will also have to extend and complete my tests.....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that 0.43 isn't out yet, I recommend keeping this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, should have read it more carefully. So it will be renamed in 0.43 again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely get this though and make sure this change is what you need. I did not run this code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked and your changes fix the issue! The texture is shown correctly again.
Description
This should resolve #316 and close pyvista/pyvista#5209
Checklist
which are formatted per the Google Python Style Guidelines.
or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).