Fix scene graph node creation for local patch (closes #701)

This commit is contained in:
Alexander Bock
2018-08-29 14:34:41 -04:00
parent 64524e8f44
commit 00e1fe01bd

View File

@@ -178,6 +178,8 @@ openspace.globebrowsing.parseInfoFile = function (file)
name = Name
end
local identifier = Identifier
local color = nil
if ColorFile then
color = {
@@ -205,7 +207,7 @@ openspace.globebrowsing.parseInfoFile = function (file)
location = Location
end
return name, color, height, location
return name, color, height, location, identifier
end
openspace.globebrowsing.addBlendingLayersFromDirectory = function (dir, node_name)
@@ -234,7 +236,7 @@ openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name)
for _, file in pairs(files) do
if file and file:find('.info') then
local n, l
n, _, _, l = openspace.globebrowsing.parseInfoFile(file)
n, _, _, l, i = openspace.globebrowsing.parseInfoFile(file)
if n and l then
openspace.printInfo("Creating focus node for '" .. n .. "'")
@@ -246,6 +248,7 @@ openspace.globebrowsing.addFocusNodesFromDirectory = function (dir, node_name)
openspace.addSceneGraphNode({
Name = node_name .. " - " .. n,
Identifier = node_name .. "-" .. i,
Parent = node_name,
Transform = {
Translation = {