Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-07-12 16:58:01 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-07-12 16:58:01 +0400
commit24c77647d2a388f294fb56bd5772c2c0e17dd392 (patch)
treeadef3b66cfc6988864a3a54fc44b9875bcb1041c /source/blender/makesrna/intern/rna_object.c
parent1d205f4446316377f87b1862a5be39470b6b03b0 (diff)
Moved code for calculating local_matrix to BKE funtion for reuse
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index d48dbbb1300..542be30c08b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -44,7 +44,7 @@
#include "BKE_paint.h"
#include "BKE_editmesh.h"
#include "BKE_group.h" /* needed for BKE_group_object_exists() */
-
+#include "BKE_object.h" /* Needed for BKE_object_matrix_local_get() */
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
@@ -216,15 +216,7 @@ static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16])
{
Object *ob = ptr->id.data;
-
- if (ob->parent) {
- float invmat[4][4]; /* for inverse of parent's matrix */
- invert_m4_m4(invmat, ob->parent->obmat);
- mul_m4_m4m4((float(*)[4])values, invmat, ob->obmat);
- }
- else {
- copy_m4_m4((float(*)[4])values, ob->obmat);
- }
+ BKE_object_matrix_local_get(ob, (float(*)[4])values);
}
static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])