Replace Main->lock with an anoynous structure pointer
This way it's not needed to include BLI_threads.h from the BKE_main.h which helps avoiding adding PThreads includes to each library which uses Main on Windows. From the API point of view it's now MainLock* and to lock or unlock the main you're to use BKE_main_(un)lock(). This solves compilation error on Windows with SCons.
This commit is contained in:
@@ -780,13 +780,13 @@ void test_object_materials(Main *bmain, ID *id)
|
||||
return;
|
||||
}
|
||||
|
||||
BLI_spin_lock(&bmain->lock);
|
||||
BKE_main_lock(bmain);
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next) {
|
||||
if (ob->data == id) {
|
||||
BKE_material_resize_object(ob, *totcol, false);
|
||||
}
|
||||
}
|
||||
BLI_spin_unlock(&bmain->lock);
|
||||
BKE_main_unlock(bmain);
|
||||
}
|
||||
|
||||
void assign_material_id(ID *id, Material *ma, short act)
|
||||
|
||||
Reference in New Issue
Block a user