Previously the exporter built a scene for eevee which felt a bit overkill. The code is much nicer now and has the same functionality.
My main intention here was to learn how to use offscreen rendering with the new gpu api though.
Details
Diff Detail
- Repository
- rBA Blender Add-ons
- Branch
- export_uv_offscreen
- Build Status
Buildable 2399 Build 2399: arc lint + arc unit
Event Timeline
| io_mesh_uv_layout/export_uv_png.py | ||
|---|---|---|
| 166 | I don't really like the idea of compiling and keeping shaders in the global scope. with gpu.matrix.push_pop():
mat = Matrix.Identity(4)
gpu.matrix.load_matrix(mat)
gpu.matrix.load_projection_matrix(mat)
"""draw things""" | |
| io_mesh_uv_layout/export_uv_png.py | ||
|---|---|---|
| 166 | This module is only loaded when it is actually needed. So compiling the shader at module level is fine. Yes, took me a while to figure out that I could use the gpu.matrix module... First I tried to set the matrix using uniform_float. | |