mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Fix scene graph node creation for local patch (closes #701)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user