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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-28 15:40:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-28 20:32:36 +0300
commit035b40337a0351910486c2f9a5a00b28cde6e939 (patch)
treebf2ef13b16232af3266d435ee0ed82a989f5f6f9 /source/blender/blenkernel/intern/library.c
parentd834759423842fa16969b84ac79902aaa316e775 (diff)
Fix T48965: Cannot Append Palette As Local Datablock.
Palette and PaintCurve were totally missing from id_copy/id_make_local switch... :/
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index ce70e5da82f..c4df2ed4c62 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -105,6 +105,7 @@
#include "BKE_mask.h"
#include "BKE_node.h"
#include "BKE_object.h"
+#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_packedFile.h"
#include "BKE_sound.h"
@@ -423,6 +424,12 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local)
case ID_LS:
if (!test) BKE_linestyle_make_local(bmain, (FreestyleLineStyle *)id, lib_local);
return true;
+ case ID_PAL:
+ if (!test) BKE_palette_make_local(bmain, (Palette *)id, lib_local);
+ return true;
+ case ID_PC:
+ if (!test) BKE_paint_curve_make_local(bmain, (PaintCurve *)id, lib_local);
+ return true;
}
return false;
@@ -525,6 +532,12 @@ bool id_copy(Main *bmain, ID *id, ID **newid, bool test)
case ID_LS:
if (!test) *newid = (ID *)BKE_linestyle_copy(bmain, (FreestyleLineStyle *)id);
return true;
+ case ID_PAL:
+ if (!test) *newid = (ID *)BKE_palette_copy(bmain, (Palette *)id);
+ return true;
+ case ID_PC:
+ if (!test) *newid = (ID *)BKE_paint_curve_copy(bmain, (PaintCurve *)id);
+ return true;
}
return false;