Page MenuHome

font loading creates duplicate ID names
Closed, ResolvedPublic

Description

Blender Version
All versions (2.93, master).

Short description of error

It's possible to load fonts with duplicate ID names in the Python API.

import bpy
filepath = "/path/to/font.ttf"
for i in range(10):
    bpy.data.fonts.load(filepath, check_existing=False)
keys = list(bpy.data.fonts.keys())
print(keys)
assert(len(keys) == len(set(keys)))

Running this script asserts when it shouldn't.