Fix T60046: crash with Cycles viewport render and particle info node.

This code was not correctly ported to 2.8.
This commit is contained in:
2019-01-02 16:32:32 +01:00
parent 7765277240
commit d903eb6129

View File

@@ -490,9 +490,6 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
object->dupli_generated = 0.5f*get_float3(b_instance.orco()) - make_float3(0.5f, 0.5f, 0.5f);
object->dupli_uv = get_float2(b_instance.uv());
object->random_id = b_instance.random_id();
/* Sync possible particle data. */
sync_dupli_particle(b_ob, b_instance, object);
}
else {
object->dupli_generated = make_float3(0.0f, 0.0f, 0.0f);
@@ -503,6 +500,11 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
object->tag_update(scene);
}
if(is_instance) {
/* Sync possible particle data. */
sync_dupli_particle(b_parent, b_instance, object);
}
return object;
}