From d86991ef378cb9220dfb8e9e6cbbd734e81de052 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 17 Jan 2019 12:28:50 +0100 Subject: Fix T60580: depsgraph object instance 'matrix_world' always returns identity matrix. While form a strict consistency point of view it could make sense to return identity matrix for non-instance items, it can be very handy to get that info (common to both instances and regular objects) directly in all cases. --- source/blender/makesrna/intern/rna_depsgraph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_depsgraph.c') diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index 843c53d5fd3..1c505d757ff 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -151,7 +151,10 @@ static void rna_DepsgraphObjectInstance_matrix_world_get(PointerRNA *ptr, float copy_m4_m4((float(*)[4])mat, deg_iter->dupli_object_current->mat); } else { - unit_m4((float(*)[4])mat); + /* We can return actual object's matrix here, no reason to return identity matrix + * when this is not actually an instance... */ + Object *ob = (Object *)iterator->current; + copy_m4_m4((float(*)[4])mat, ob->obmat); } } -- cgit v1.2.3