Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_add.c
| Show First 20 Lines • Show All 1,797 Lines • ▼ Show 20 Lines | for (dob = lb_duplis->first; dob; dob = dob->next) { | ||||
| if (ob_dst->mat == NULL) { | if (ob_dst->mat == NULL) { | ||||
| ob_dst->totcol = 0; | ob_dst->totcol = 0; | ||||
| } | } | ||||
| BKE_collection_object_add_from(bmain, scene, base->object, ob_dst); | BKE_collection_object_add_from(bmain, scene, base->object, ob_dst); | ||||
| base_dst = BKE_view_layer_base_find(view_layer, ob_dst); | base_dst = BKE_view_layer_base_find(view_layer, ob_dst); | ||||
| BLI_assert(base_dst != NULL); | BLI_assert(base_dst != NULL); | ||||
| ED_object_base_select(base_dst, BA_SELECT); | |||||
| DEG_id_tag_update(&ob_dst->id, ID_RECALC_SELECT); | |||||
| BKE_scene_object_base_flag_sync_from_base(base_dst); | BKE_scene_object_base_flag_sync_from_base(base_dst); | ||||
| /* make sure apply works */ | /* make sure apply works */ | ||||
| BKE_animdata_free(&ob_dst->id, true); | BKE_animdata_free(&ob_dst->id, true); | ||||
| ob_dst->adt = NULL; | ob_dst->adt = NULL; | ||||
| /* Proxies are not to be copied. */ | /* Proxies are not to be copied. */ | ||||
| ob_dst->proxy_from = NULL; | ob_dst->proxy_from = NULL; | ||||
| ▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| ob->proxy = NULL; | ob->proxy = NULL; | ||||
| ob->proxy_from = NULL; | ob->proxy_from = NULL; | ||||
| DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); | DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); | ||||
| } | } | ||||
| } | } | ||||
| base->object->instance_collection = NULL; | base->object->instance_collection = NULL; | ||||
| } | } | ||||
| ED_object_base_select(base, BA_DESELECT); | |||||
| DEG_id_tag_update(&base->object->id, ID_RECALC_SELECT); | |||||
| BLI_ghash_free(dupli_gh, NULL, NULL); | BLI_ghash_free(dupli_gh, NULL, NULL); | ||||
| if (parent_gh) { | if (parent_gh) { | ||||
| BLI_ghash_free(parent_gh, NULL, NULL); | BLI_ghash_free(parent_gh, NULL, NULL); | ||||
| } | } | ||||
| if (instancer_gh) { | if (instancer_gh) { | ||||
| BLI_ghash_free(instancer_gh, NULL, NULL); | BLI_ghash_free(instancer_gh, NULL, NULL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 995 Lines • Show Last 20 Lines | |||||