Fix T61362: Hair particles does not appear when rendering

Fix T61406: Particles don't render

Consider initial dependency graph evaluation as a file load.

Is still resetting too much, but that we can solve later.
This commit is contained in:
Sergey Sharybin 2019-02-11 15:18:12 +01:00
parent 51d161a89e
commit 3117446967
Notes: blender-bot 2023-02-14 03:47:00 +01:00
Referenced by issue #61406, Particles don't render
Referenced by issue #61362, Hair particles does not appear when rendering
1 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,7 @@ extern "C" {
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
@ -579,6 +580,18 @@ void update_particle_system_orig_pointers(const Object *object_orig,
}
}
void set_particle_system_modifiers_loaded(Object *object_cow)
{
LISTBASE_FOREACH(ModifierData *, md, &object_cow->modifiers) {
if (md->type != eModifierType_ParticleSystem) {
continue;
}
ParticleSystemModifierData *psmd =
reinterpret_cast<ParticleSystemModifierData*>(md);
psmd->flag |= eParticleSystemFlag_file_loaded;
}
}
void update_pose_orig_pointers(const bPose *pose_orig, bPose *pose_cow)
{
bPoseChannel *pchan_cow = (bPoseChannel *) pose_cow->chanbase.first;
@ -621,6 +634,7 @@ void update_special_pointers(const Depsgraph *depsgraph,
}
}
update_particle_system_orig_pointers(object_orig, object_cow);
set_particle_system_modifiers_loaded(object_cow);
break;
}
case ID_SCE: