Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-25 04:31:30 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-25 04:46:11 +0300
commitfbb03f67ec3434281b7024627790337fb9eb3502 (patch)
tree5afd404cdf688a8e7fdaeebb03c1073487e553d3 /source
parent2fabbe31084e7a9d28b831b9a39f090e3ae86095 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/alembic/intern/abc_util.cc5
-rw-r--r--source/blender/alembic/intern/abc_util.h5
-rw-r--r--source/blender/alembic/intern/alembic_capi.cc5
3 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc
index 380ceff80cf..ed3ee051a44 100644
--- a/source/blender/alembic/intern/abc_util.cc
+++ b/source/blender/alembic/intern/abc_util.cc
@@ -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();
diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h
index 44ad4bca2f7..f7f662212fd 100644
--- a/source/blender/alembic/intern/abc_util.h
+++ b/source/blender/alembic/intern/abc_util.h
@@ -210,11 +210,6 @@ class SimpleLogger {
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.
*/
std::string str() const;
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index aac7a7f2d82..3ff3fbe2001 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -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...");
}