diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-17 14:28:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-01-17 14:34:08 +0300 |
commit | d86991ef378cb9220dfb8e9e6cbbd734e81de052 (patch) | |
tree | baa701108f7279e0f153c598825a122d8dfd8419 /source/blender/makesrna/intern/rna_depsgraph.c | |
parent | 32dc085289ace78255c4726e7adf03c49cec66e9 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } } |