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...
This commit is contained in:
parent
c058c33864
commit
42f4c14732
Notes:
blender-bot
2023-02-14 08:45:09 +01:00
Referenced by issue #64608, DOF Focus object, not linked to new copy, Scen "full_copy"
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue