Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_relations.c
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_camera.h" | #include "BKE_camera.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_constraint.h" | #include "BKE_constraint.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_DerivedMesh.h" | #include "BKE_DerivedMesh.h" | ||||
| #include "BKE_displist.h" | #include "BKE_displist.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_gpencil.h" | |||||
| #include "BKE_group.h" | #include "BKE_group.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_lamp.h" | #include "BKE_lamp.h" | ||||
| #include "BKE_lattice.h" | #include "BKE_lattice.h" | ||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_library_query.h" | #include "BKE_library_query.h" | ||||
| ▲ Show 20 Lines • Show All 1,643 Lines • ▼ Show 20 Lines | if (copy_groups && group->gobject.first) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* group pointers in scene */ | /* group pointers in scene */ | ||||
| BKE_scene_groups_relink(scene); | BKE_scene_groups_relink(scene); | ||||
| /* active camera */ | |||||
| ID_NEW_REMAP(scene->camera); | ID_NEW_REMAP(scene->camera); | ||||
| if (v3d) ID_NEW_REMAP(v3d->camera); | if (v3d) ID_NEW_REMAP(v3d->camera); | ||||
| /* gp_object */ | |||||
| ID_NEW_REMAP(scene->gp_object); | |||||
| /* object and group pointers */ | /* object and group pointers */ | ||||
| libblock_relink_scene_collection(msc); | libblock_relink_scene_collection(msc); | ||||
| set_sca_new_poins(); | set_sca_new_poins(); | ||||
| /* TODO redo filter */ | /* TODO redo filter */ | ||||
| TODO_LAYER_SYNC_FILTER | TODO_LAYER_SYNC_FILTER | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | if (!ID_IS_LINKED_DATABLOCK(ob)) { | ||||
| case OB_ARMATURE: | case OB_ARMATURE: | ||||
| DEG_id_tag_update(&ob->id, OB_RECALC_DATA); | DEG_id_tag_update(&ob->id, OB_RECALC_DATA); | ||||
| ob->data = ID_NEW_SET(ob->data, BKE_armature_copy(bmain, ob->data)); | ob->data = ID_NEW_SET(ob->data, BKE_armature_copy(bmain, ob->data)); | ||||
| BKE_pose_rebuild(ob, ob->data); | BKE_pose_rebuild(ob, ob->data); | ||||
| break; | break; | ||||
| case OB_SPEAKER: | case OB_SPEAKER: | ||||
| ob->data = ID_NEW_SET(ob->data, BKE_speaker_copy(bmain, ob->data)); | ob->data = ID_NEW_SET(ob->data, BKE_speaker_copy(bmain, ob->data)); | ||||
| break; | break; | ||||
| case OB_GPENCIL: | |||||
| ob->data = ID_NEW_SET(ob->data, BKE_gpencil_copy(bmain, ob->data)); | |||||
| break; | |||||
| default: | default: | ||||
| if (G.debug & G_DEBUG) | if (G.debug & G_DEBUG) | ||||
| printf("ERROR %s: can't copy %s\n", __func__, id->name); | printf("ERROR %s: can't copy %s\n", __func__, id->name); | ||||
| return; | return; | ||||
| } | } | ||||
| /* Copy animation data after object data became local, | /* Copy animation data after object data became local, | ||||
| * otherwise old and new object data will share the same | * otherwise old and new object data will share the same | ||||
| ▲ Show 20 Lines • Show All 655 Lines • Show Last 20 Lines | |||||