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>2017-08-07 21:48:22 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-08-07 21:48:22 +0300
commite673c9dc938844d158abe543457aca8016ef8bc1 (patch)
treef07f233140366557f48c3969e05c21c8a0be9764 /source/blender/blenkernel/intern/lightprobe.c
parent41830cc432b9726cb64bc396af4dafbf591c17be (diff)
Merge again...
Diffstat (limited to 'source/blender/blenkernel/intern/lightprobe.c')
-rw-r--r--source/blender/blenkernel/intern/lightprobe.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c
index a1fa266512b..5601fa5ad42 100644
--- a/source/blender/blenkernel/intern/lightprobe.c
+++ b/source/blender/blenkernel/intern/lightprobe.c
@@ -59,22 +59,32 @@ void *BKE_lightprobe_add(Main *bmain, const char *name)
{
LightProbe *probe;
- probe = BKE_libblock_alloc(bmain, ID_LP, name);
+ probe = BKE_libblock_alloc(bmain, ID_LP, name, 0);
BKE_lightprobe_init(probe);
return probe;
}
-LightProbe *BKE_lightprobe_copy(Main *bmain, LightProbe *probe)
+/**
+ * Only copy internal data of LightProbe ID from source to already allocated/initialized destination.
+ * You probably nerver want to use that directly, use id_copy or BKE_id_copy_ex for typical needs.
+ *
+ * WARNING! This function will not handle ID user count!
+ *
+ * \param flag Copying options (see BKE_library.h's LIB_ID_COPY_... flags for more).
+ */
+void BKE_lightprobe_copy_data(
+ Main *UNUSED(bmain), LightProbe *UNUSED(probe_dst), const LightProbe *UNUSED(probe_src), const int UNUSED(flag))
{
- LightProbe *probe_new;
-
- probe_new = BKE_libblock_copy(bmain, &probe->id);
-
- BKE_id_copy_ensure_local(bmain, &probe->id, &probe_new->id);
+ /* Nothing to do here. */
+}
- return probe_new;
+LightProbe *BKE_lightprobe_copy(Main *bmain, const LightProbe *probe)
+{
+ LightProbe *probe_copy;
+ BKE_id_copy_ex(bmain, &probe->id, (ID **)&probe_copy, 0, false);
+ return probe_copy;
}
void BKE_lightprobe_make_local(Main *bmain, LightProbe *probe, const bool lib_local)