From c3d03b4434c8554bbfff6cdc549bb089dec1da28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 14 Nov 2018 11:44:05 +0100 Subject: Lamps: Remove HEMI light type This type is not supported by either Eevee or Cycles. If other types of lamps are needed by external engines, we should support adding custom types. --- source/blender/blenloader/intern/versioning_280.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a72304a6d92..2049856cfa6 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2258,6 +2258,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + for (Lamp *la = bmain->lamp.first; la; la = la->id.next) { + /* Removed Hemi lights. */ + if (!ELEM(la->type, LA_LOCAL, LA_SUN, LA_SPOT, LA_AREA)) { + la->type = LA_SUN; + } + } + if (!DNA_struct_elem_find(fd->filesdna, "Brush", "char", "weightpaint_tool")) { /* Magic defines from old files (2.7x) */ -- cgit v1.2.3