Fix T63528: Alembic export always showing error on macOS, even on success
tellp() is not valid to check if the string stream is empty. Just get the string directly as there is no obvious efficient method to check otherwise.
This commit is contained in:
parent
2fabbe3108
commit
fbb03f67ec
Notes:
blender-bot
2023-02-14 10:09:24 +01:00
Referenced by issue #63528, Alembic Export Error
|
@ -378,11 +378,6 @@ ScopeTimer::~ScopeTimer()
|
|||
|
||||
/* ********************** */
|
||||
|
||||
bool SimpleLogger::empty()
|
||||
{
|
||||
return ((size_t)m_stream.tellp()) == 0ul;
|
||||
}
|
||||
|
||||
std::string SimpleLogger::str() const
|
||||
{
|
||||
return m_stream.str();
|
||||
|
|
|
@ -209,11 +209,6 @@ class SimpleLogger {
|
|||
std::ostringstream m_stream;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Check whether or not the SimpleLogger's stream is empty.
|
||||
*/
|
||||
bool empty();
|
||||
|
||||
/**
|
||||
* Return a copy of the string contained in the SimpleLogger's stream.
|
||||
*/
|
||||
|
|
|
@ -290,8 +290,9 @@ static void export_endjob(void *customdata)
|
|||
BLI_delete(data->filename, false, false);
|
||||
}
|
||||
|
||||
if (!data->settings.logger.empty()) {
|
||||
std::cerr << data->settings.logger;
|
||||
std::string log = data->settings.logger.str();
|
||||
if (!log.empty()) {
|
||||
std::cerr << log;
|
||||
WM_report(RPT_ERROR, "Errors occurred during the export, look in the console to know more...");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue