Fix cycles "synchronizing object" status being shown when it was already finished.
This commit is contained in:
parent
4cf06b97dd
commit
1d2e59ba1c
@ -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();
|
||||
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
tile_time = 0.0f;
|
||||
status = "Initializing";
|
||||
substatus = "";
|
||||
sync_status = "";
|
||||
sync_substatus = "";
|
||||
update_cb = NULL;
|
||||
cancel = false;
|
||||
cancel_message = "";
|
||||
@ -164,12 +166,43 @@ 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);
|
||||
|
||||
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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user