Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_action.h" | #include "BKE_action.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_armature.h" | #include "BKE_armature.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_library_query.h" | #include "BKE_library_query.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_pointcache.h" | |||||
| #include "BKE_sequencer.h" | #include "BKE_sequencer.h" | ||||
| #include "BKE_sound.h" | #include "BKE_sound.h" | ||||
| } | } | ||||
| #include "intern/depsgraph.h" | #include "intern/depsgraph.h" | ||||
| #include "intern/builder/deg_builder.h" | #include "intern/builder/deg_builder.h" | ||||
| #include "intern/builder/deg_builder_nodes.h" | #include "intern/builder/deg_builder_nodes.h" | ||||
| #include "intern/node/deg_node.h" | #include "intern/node/deg_node.h" | ||||
| ▲ Show 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (ModifierData *, md, &object_cow->modifiers) { | ||||
| if (md->type != eModifierType_ParticleSystem) { | if (md->type != eModifierType_ParticleSystem) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| ParticleSystemModifierData *psmd = reinterpret_cast<ParticleSystemModifierData *>(md); | ParticleSystemModifierData *psmd = reinterpret_cast<ParticleSystemModifierData *>(md); | ||||
| psmd->flag |= eParticleSystemFlag_file_loaded; | psmd->flag |= eParticleSystemFlag_file_loaded; | ||||
| } | } | ||||
| } | } | ||||
| void reset_particle_system_edit_eval(Object *object_cow) | |||||
| { | |||||
| LISTBASE_FOREACH (ParticleSystem *, psys, &object_cow->particlesystem) { | |||||
| ParticleSystem *orig_psys = psys->orig_psys; | |||||
| if (orig_psys->edit != NULL) { | |||||
| orig_psys->edit->psys_eval = NULL; | |||||
| orig_psys->edit->psmd_eval = NULL; | |||||
| } | |||||
| } | |||||
| } | |||||
| void update_particles_after_copy(const Object *object_orig, Object *object_cow) | void update_particles_after_copy(const Object *object_orig, Object *object_cow) | ||||
| { | { | ||||
| update_particle_system_orig_pointers(object_orig, object_cow); | update_particle_system_orig_pointers(object_orig, object_cow); | ||||
| set_particle_system_modifiers_loaded(object_cow); | set_particle_system_modifiers_loaded(object_cow); | ||||
| reset_particle_system_edit_eval(object_cow); | |||||
| } | } | ||||
| void update_pose_orig_pointers(const bPose *pose_orig, bPose *pose_cow) | void update_pose_orig_pointers(const bPose *pose_orig, bPose *pose_cow) | ||||
| { | { | ||||
| update_list_orig_pointers(&pose_orig->chanbase, &pose_cow->chanbase, &bPoseChannel::orig_pchan); | update_list_orig_pointers(&pose_orig->chanbase, &pose_cow->chanbase, &bPoseChannel::orig_pchan); | ||||
| } | } | ||||
| void update_modifiers_orig_pointers(const Object *object_orig, Object *object_cow) | void update_modifiers_orig_pointers(const Object *object_orig, Object *object_cow) | ||||
| ▲ Show 20 Lines • Show All 879 Lines • Show Last 20 Lines | |||||