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>2019-06-11 21:48:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-06-11 21:50:10 +0300
commit42f4c147324f7d14f7d1cd3bcab20295176de846 (patch)
tree7b994e0495542d43829ff93282513a11dfdfeac1 /source/blender/editors/object/object_relations.c
parentc058c3386487ccfa6bc7ccdb2f534d5c41ece99d (diff)
Fix T64608: DOF Focus object, not linked to new copy, Scen "full_copy".
Note that there are probably many other similar cases... This code is really legacy, should use library_query helpers and other modern BKE_library code instead of doing its own dirty cooking...
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f748fd247ee..1446ea23bb8 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -29,19 +29,20 @@
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
-#include "DNA_mesh_types.h"
+#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_gpencil_types.h"
#include "DNA_light_types.h"
#include "DNA_lattice_types.h"
#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
+#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
-#include "DNA_world_types.h"
-#include "DNA_object_types.h"
#include "DNA_vfont_types.h"
-#include "DNA_gpencil_types.h"
+#include "DNA_world_types.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
@@ -1852,7 +1853,7 @@ static void single_obdata_users(
{
Light *la;
Curve *cu;
- /* Camera *cam; */
+ Camera *cam;
Mesh *me;
Lattice *lat;
ID *id;
@@ -1869,7 +1870,8 @@ static void single_obdata_users(
ob->data = la = ID_NEW_SET(ob->data, BKE_light_copy(bmain, ob->data));
break;
case OB_CAMERA:
- ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data));
+ cam = ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data));
+ ID_NEW_REMAP(cam->dof.focus_object);
break;
case OB_MESH:
/* Needed to remap texcomesh below. */