diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_progress.h | 40 |
2 files changed, 41 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index eb9deb0de2d..8fbb223cbc5 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -309,7 +309,7 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion) hide = hide || !(ob_layer & scene_layer); if(!hide) { - progress.set_status("Synchronizing object", (*b_ob).name()); + progress.set_sync_status("Synchronizing object", (*b_ob).name()); int num_particles = object_count_particles(*b_ob); @@ -356,6 +356,8 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, int motion) } } + progress.set_sync_status(""); + if(!cancel && !motion) { sync_background_light(); diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index ab9ab7243e9..c97379d8776 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -43,6 +43,8 @@ public: tile_time = 0.0f; status = "Initializing"; substatus = ""; + sync_status = ""; + sync_substatus = ""; update_cb = NULL; cancel = false; cancel_message = ""; @@ -164,11 +166,42 @@ public: set_update(); } + void set_sync_status(const string& status_, const string& substatus_ = "") + { + { + thread_scoped_lock lock(progress_mutex); + sync_status = status_; + sync_substatus = substatus_; + total_time = time_dt() - start_time; + } + + set_update(); + + } + + void set_sync_substatus(const string& substatus_) + { + { + thread_scoped_lock lock(progress_mutex); + sync_substatus = substatus_; + total_time = time_dt() - start_time; + } + + set_update(); + } + void get_status(string& status_, string& substatus_) { thread_scoped_lock lock(progress_mutex); - status_ = status; - substatus_ = substatus; + + if(sync_status != "") { + status_ = sync_status; + substatus_ = sync_substatus; + } + else { + status_ = status; + substatus_ = substatus; + } } /* callback */ @@ -202,6 +235,9 @@ protected: string status; string substatus; + string sync_status; + string sync_substatus; + volatile bool cancel; string cancel_message; }; |