mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Add function allowing insight into currently loaded assets. Don't print info message when loading asset that was already loaded
This commit is contained in:
@@ -40,7 +40,10 @@ if is_image_file(extension) then
|
||||
TexturePath = "]] .. filename .. [["
|
||||
});]] .. ReloadUIScript
|
||||
elseif extension == ".asset" then
|
||||
return [[openspace.printInfo("Adding asset: ']] .. filename .. [[' (drag-and-drop)");
|
||||
return [[
|
||||
if openspace.asset.isLoaded("]] .. filename .. [[") ~= true then
|
||||
openspace.printInfo("Adding asset: ']] .. filename .. [[' (drag-and-drop)");
|
||||
end
|
||||
openspace.asset.add("]] .. filename .. [[");]] .. ReloadUIScript
|
||||
elseif extension == ".osrec" or extension == ".osrectxt" then
|
||||
return [[openspace.sessionRecording.startPlayback("]] .. filename .. [[")]]
|
||||
|
||||
Reference in New Issue
Block a user