diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-02 18:32:32 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-02 19:19:45 +0300 |
commit | d903eb6129fba1450e6c53c5b7eaa6b1c44ab7cf (patch) | |
tree | 29bea535ea99a7b2f356b53efb30b5d9289a5c36 /intern/cycles | |
parent | 7765277240c8d54ac290cf35c08f7f7d046e4ae2 (diff) |
Fix T60046: crash with Cycles viewport render and particle info node.
This code was not correctly ported to 2.8.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 0f9994847c0..37fea2417ba 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -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; } |