function openf3d(FileName)
% 3D Foundation open file action for the .F3D file extension

%   Copyright 1998-2021 HUMUSOFT s.r.o.
%   ^..^

    [~, WorldName, ~] = fileparts(FileName);
    World = F3D.World(WorldName);
    World.initialize;
    World.Viewports.Main.Title = WorldName;
    try
        World.load(FileName);
    catch ME
        delete(World);
        rethrow(ME);
    end

end