下拉菜单标签显示乱码文本: EnumProperty 项回调函数不保留对返回的字符串的引用
作者: cvonk创建于 2026年8月19日更新于 2026年8月19日
operators/io_import_georaster.py:62
def listObjects(self, context):
objs = [] # local - freed on return
for index, object in enumerate(bpy.context.scene.objects):
if object.type == 'MESH':
objs.append((str(index), object.name, "Object named " + object.name))
return objsobjs and the tuples inside it are dropped as soon as the function returns, but Blender keeps pointing at the strings until the next redraw.
内容来源: domlysz/BlenderGIS