Browse Source

Add some light related GLTF support and fix bugs

Panagiotis Christopoulos Charitos 5 years ago
parent
commit
f1911bfccf
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/anki/importer/GltfImporter.cpp
  2. 1 1
      thirdparty

+ 2 - 2
src/anki/importer/GltfImporter.cpp

@@ -1027,7 +1027,7 @@ Error GltfImporter::writeLight(const cgltf_node& node, const HashMapAuto<CString
 	ANKI_GLTF_LOGI("Importing light %s", nodeName.cstr());
 	ANKI_GLTF_LOGI("Importing light %s", nodeName.cstr());
 
 
 	HashMapAuto<CString, StringAuto> extras(parentExtras);
 	HashMapAuto<CString, StringAuto> extras(parentExtras);
-	ANKI_CHECK(getExtras(node.extras, extras));
+	ANKI_CHECK(getExtras(light.extras, extras));
 
 
 	CString lightTypeStr;
 	CString lightTypeStr;
 	switch(light.type)
 	switch(light.type)
@@ -1138,7 +1138,7 @@ Error GltfImporter::writeLight(const cgltf_node& node, const HashMapAuto<CString
 		}
 		}
 	}
 	}
 
 
-	auto lightEventIntensity = extras.find("lens_flare");
+	auto lightEventIntensity = extras.find("light_event_intensity");
 	auto lightEventFrequency = extras.find("light_event_frequency");
 	auto lightEventFrequency = extras.find("light_event_frequency");
 	if(lightEventIntensity != extras.getEnd() || lightEventFrequency != extras.getEnd())
 	if(lightEventIntensity != extras.getEnd() || lightEventFrequency != extras.getEnd())
 	{
 	{

+ 1 - 1
thirdparty

@@ -1 +1 @@
-Subproject commit b9353c88a4684fb71975f547afbc5bcdc469465a
+Subproject commit 74cce1f9643ac49a364c89d3f9229a6d613b10ce