mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Add the ability to toggle planets in the customization/globebrowsing.asset (closes #1392)
Improve the handling of reading info files that have error messages
This commit is contained in:
@@ -205,11 +205,22 @@ openspace.globebrowsing.parseInfoFile = function (file)
|
||||
HeightFile = nil
|
||||
|
||||
local dir = openspace.directoryForPath(file)
|
||||
dofile(file)
|
||||
file_func, error = loadfile(file)
|
||||
if file_func then
|
||||
file_func()
|
||||
else
|
||||
openspace.printError('Error loading file "' .. file .. '": '.. error)
|
||||
return nil, nil, nil, nil
|
||||
end
|
||||
|
||||
local name = Name or Identifier
|
||||
local identifier = Identifier or Name
|
||||
|
||||
if name == nil and identifier == nil then
|
||||
openspace.printError('Error loading file "' .. file .. '": No "Name" or "Identifier" found')
|
||||
return nil, nil, nil, nil
|
||||
end
|
||||
|
||||
local color = nil
|
||||
if ColorFile then
|
||||
color = {
|
||||
|
||||
Reference in New Issue
Block a user