saturday06
VRM-Addon-for-Blender
BlogDocsChangelog

fix: prevent duplicate image buffer data on export

#1148Merged
Comparing
djmittens:fix/image-buffer-duplication
(
af4c953
) with
main
(
a56dce8
)
CodSpeed Performance Gauge
0%
Untouched
13

Benchmarks

Passed

test_many_bone_assignment
benchmarks/src/io_scene_vrm_benchmarks/many_bone_assignment_benchmark_test.py
CodSpeed Performance Gauge
+1%
15.5 s15.3 s
test_vrm1_export
benchmarks/src/io_scene_vrm_benchmarks/vrm1_export_benchmark_test.py
CodSpeed Performance Gauge
+1%
15.5 s15.4 s
test_vrm1_import
benchmarks/src/io_scene_vrm_benchmarks/vrm1_import_benchmark_test.py
CodSpeed Performance Gauge
0%
49.1 s49 s
test_mtoon1_auto_setup
benchmarks/src/io_scene_vrm_benchmarks/mtoon1_auto_setup_benchmark_test.py
CodSpeed Performance Gauge
0%
243.9 ms243.2 ms
test_spring_bone_many_springs
benchmarks/src/io_scene_vrm_benchmarks/spring_bone_many_springs_benchmark_test.py
CodSpeed Performance Gauge
0%
2.1 s2.1 s
test_spring_bone
benchmarks/src/io_scene_vrm_benchmarks/spring_bone_benchmark_test.py
CodSpeed Performance Gauge
0%
166.1 ms165.9 ms
test_outline_updater
benchmarks/src/io_scene_vrm_benchmarks/outline_updater_benchmark_test.py
CodSpeed Performance Gauge
0%
206.7 ms206.7 ms
test_vrm0_import
benchmarks/src/io_scene_vrm_benchmarks/vrm0_import_benchmark_test.py
CodSpeed Performance Gauge
0%
21 s21 s
test_vrm0_export
benchmarks/src/io_scene_vrm_benchmarks/vrm0_export_benchmark_test.py
CodSpeed Performance Gauge
0%
21.9 s21.9 s
test_expression_preview
benchmarks/src/io_scene_vrm_benchmarks/expression_preview_benchmark_test.py
CodSpeed Performance Gauge
0%
44 s44 s
test_look_at_preview_updater
benchmarks/src/io_scene_vrm_benchmarks/look_at_preview_updater_benchmark_test.py
CodSpeed Performance Gauge
0%
294.8 ms295.5 ms
test_spring_bone_assignment
benchmarks/src/io_scene_vrm_benchmarks/spring_bone_assignment_benchmark_test.py
CodSpeed Performance Gauge
0%
17.4 s17.5 s
test_nop
benchmarks/src/io_scene_vrm_benchmarks/nop_benchmark_test.py
CodSpeed Performance Gauge
0%
19 µs19.1 µs

Commits

Click on a commit to change the comparison range
Base
main
a56dce8
+0.14%
fix: prevent duplicate image buffer data on export When find_or_create_image was called for an image that already existed in image_name_to_index_dict, the function would still: 1. Create a new bufferView 2. Append the image bytes to buffer0 3. Only then check if the image already existed This caused exported VRM files to contain duplicate image data, with orphan bufferViews that were never referenced. The file size would grow significantly - in one test case from 48MB to 150MB+. The fix moves the existence check to the beginning of the function, returning early if the image has already been processed. Fixes #579
af4c953
9 days ago
by djmittens
© 2026 CodSpeed Technology
Home Terms Privacy Docs