function [m,ok] = leaf_savestage( m )
%[m,ok] = leaf_savestage( m )
%
%   Save the current state of the mesh as a stage file.
%
%   Options: none.

    if isempty( m.globalProps.modelname ) || isempty( m.globalProps.projectdir )
        complain( '%s: the mesh has not been saved as a project.  Stage not saved.', mfilename() );
        ok = false;
        return;
    end
    [m,ok] = leaf_savemodel( m, m.globalProps.modelname, m.globalProps.projectdir );
end
