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
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-11-06 16:09:58 +0300
committerJacques Lucke <jacques@blender.org>2020-11-06 16:10:31 +0300
commitc32a5ce17c7609c29c832a2d229c60e12d0ccbb5 (patch)
tree730dc17838dfb18d8f2eb7ab005256f08068d4c0 /source/blender/blenkernel/intern/paint.c
parent62223e98510f2c0d735cb7084134c5213c1cb804 (diff)
Refactor: move Paint lib linking to blenkernel
Ref T76372.
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 3e8bdbf0481..d726a4b1e37 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -1210,6 +1210,22 @@ void BKE_paint_blend_read_data(BlendDataReader *reader, const Scene *scene, Pain
BKE_paint_runtime_init(scene->toolsettings, p);
}
+void BKE_paint_blend_read_lib(BlendLibReader *reader, Scene *sce, Paint *p)
+{
+ if (p) {
+ BLO_read_id_address(reader, sce->id.lib, &p->brush);
+ for (int i = 0; i < p->tool_slots_len; i++) {
+ if (p->tool_slots[i].brush != NULL) {
+ BLO_read_id_address(reader, sce->id.lib, &p->tool_slots[i].brush);
+ }
+ }
+ BLO_read_id_address(reader, sce->id.lib, &p->palette);
+ p->paint_cursor = NULL;
+
+ BKE_paint_runtime_init(sce->toolsettings, p);
+ }
+}
+
/* returns non-zero if any of the face's vertices
* are hidden, zero otherwise */
bool paint_is_face_hidden(const MLoopTri *lt, const MVert *mvert, const MLoop *mloop)