diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-26 12:55:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-26 13:22:21 +0400 |
commit | 6135556f4556f0416f7ded737b26e342986ae1bf (patch) | |
tree | 9a9468c7770b7eb26f659bc704dc41132b305b7b /source/blender/blenkernel/intern/material.c | |
parent | 33e8451d4b15d04872ee0923600aad0627ab040e (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 4f6f234c6e1..971db1997de 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -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) |