|
@@ -333,6 +333,11 @@
|
|
|
if (parsedLight.excludedMeshesIds) {
|
|
|
light._excludedMeshesIds = parsedLight.excludedMeshesIds;
|
|
|
}
|
|
|
+
|
|
|
+ // Parent
|
|
|
+ if (parsedLight.parentId) {
|
|
|
+ light._waitingParentId = parsedLight.parentId;
|
|
|
+ }
|
|
|
|
|
|
// Parent
|
|
|
if (parsedLight.parentId) {
|
|
@@ -1217,6 +1222,14 @@
|
|
|
camera._waitingParentId = undefined;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ for (index = 0; index < scene.lights.length; index++) {
|
|
|
+ var light = scene.lights[index];
|
|
|
+ if (light._waitingParentId) {
|
|
|
+ light.parent = scene.getLastEntryByID(light._waitingParentId);
|
|
|
+ light._waitingParentId = undefined;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
for (index = 0; index < scene.lights.length; index++) {
|
|
|
var light = scene.lights[index];
|