Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pointcache.c
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "PIL_time.h" | #include "PIL_time.h" | ||||
| #include "BKE_appdir.h" | #include "BKE_appdir.h" | ||||
| #include "BKE_anim.h" | #include "BKE_anim.h" | ||||
| #include "BKE_cloth.h" | #include "BKE_cloth.h" | ||||
| #include "BKE_collection.h" | |||||
| #include "BKE_dynamicpaint.h" | #include "BKE_dynamicpaint.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_pointcache.h" | #include "BKE_pointcache.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| ▲ Show 20 Lines • Show All 1,664 Lines • ▼ Show 20 Lines | if (scene && ob->rigidbody_object && scene->rigidbody_world) { | ||||
| BKE_ptcache_id_from_rigidbody(pid, ob, scene->rigidbody_world); | BKE_ptcache_id_from_rigidbody(pid, ob, scene->rigidbody_world); | ||||
| BLI_addtail(lb, pid); | BLI_addtail(lb, pid); | ||||
| } | } | ||||
| /* Consider all object in dupli groups to be part of the same object, | /* Consider all object in dupli groups to be part of the same object, | ||||
| * for baking with linking dupligroups. Once we have better overrides | * for baking with linking dupligroups. Once we have better overrides | ||||
| * this can be revisited so users select the local objects directly. */ | * this can be revisited so users select the local objects directly. */ | ||||
| if (scene && (duplis-- > 0) && (ob->dup_group)) { | if (scene && (duplis-- > 0) && (ob->dup_group)) { | ||||
| Group *group = ob->dup_group; | Collection *collection = ob->dup_group; | ||||
| Base *base = group->view_layer->object_bases.first; | Base *base = BKE_collection_object_cache_get(collection).first; | ||||
| for (; base; base = base->next) { | for (; base; base = base->next) { | ||||
| if (base->object != ob) { | if (base->object != ob) { | ||||
| ListBase lb_dupli_pid; | ListBase lb_dupli_pid; | ||||
| BKE_ptcache_ids_from_object(&lb_dupli_pid, base->object, scene, duplis); | BKE_ptcache_ids_from_object(&lb_dupli_pid, base->object, scene, duplis); | ||||
| BLI_movelisttolist(lb, &lb_dupli_pid); | BLI_movelisttolist(lb, &lb_dupli_pid); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,370 Lines • Show Last 20 Lines | |||||