Repository navigation
Commit 8680ca1
fix(snippets): save_baked_image writes the requested format
Image.save_render() takes its format from the scene's render.image_settings;
image.file_format is ignored. save_baked_image(..., "OPEN_EXR") therefore wrote
a PNG with an .exr name, the common case for precision normal maps.
The snippet now sets scene.render.image_settings.file_format for the call,
passes scene= to save_render, and restores the previous format in a finally.
The bake-high-to-low skill's save step says the same and shows the pattern.
Proof (local, .scratch/blender-4.5.11-windows-x64 and blender-5.2.1, magic
bytes of the written file, float Non-Color 8x8 image):
PNG -> PNG, JPEG -> JPEG, OPEN_EXR -> OPEN_EXR on both; image.source stays
GENERATED; scene format restored. Old pattern (img.file_format = "OPEN_EXR";
save_render) -> PNG on both.
Closes #332
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 4de3726 commit 8680ca1
2 files changed
Lines changed: 25 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | | - | |
121 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
0 commit comments