forked from bartvdbraak/blender
adding object.matrixParentInverse
This commit is contained in:
parent
bcc3143119
commit
91ea74c339
@ -4391,6 +4391,13 @@ static PyObject *Object_getMatrixWorld( BPy_Object * self )
|
||||
return newMatrixObject((float*)self->object->obmat,4,4,Py_WRAP);
|
||||
}
|
||||
|
||||
/* Parent Inverse matrix */
|
||||
|
||||
static PyObject *Object_getMatrixParentInverse( BPy_Object * self )
|
||||
{
|
||||
return newMatrixObject((float*)self->object->parentinv,4,4,Py_WRAP);
|
||||
}
|
||||
|
||||
/*
|
||||
* Old behavior, prior to Blender 2.34, where eventual changes made by the
|
||||
* script itself were not taken into account until a redraw happened, either
|
||||
@ -4761,6 +4768,10 @@ static PyGetSetDef BPy_Object_getseters[] = {
|
||||
(getter)Object_getMatrixLocal, (setter)Object_setMatrix,
|
||||
"localspace matrix: relative to the object's parent",
|
||||
NULL},
|
||||
{"matrixParentInverse",
|
||||
(getter)Object_getMatrixParentInverse, (setter)NULL,
|
||||
"parents inverse matrix: parents localspace inverted matrix",
|
||||
NULL},
|
||||
{"matrixOldWorld",
|
||||
(getter)Object_getMatrixOldWorld, (setter)NULL,
|
||||
"old-type worldspace matrix (prior to Blender 2.34)",
|
||||
|
@ -366,6 +366,8 @@ class Object:
|
||||
@ivar matrixLocal: The matrix of the object relative to its parent; if there is no parent,
|
||||
returns the world matrix (L{matrixWorld<Object.Object.matrixWorld>}).
|
||||
@type matrixLocal: Matrix
|
||||
@ivar matrixParentInverse: The inverse if the parents local matrix, set when the objects parent is set (wrapped).
|
||||
@type matrixParentInverse: Matrix
|
||||
@ivar matrixOldWorld: Old-type worldspace matrix (prior to Blender 2.34).
|
||||
Read-only.
|
||||
@type matrixOldWorld: Matrix
|
||||
|
Loading…
Reference in New Issue
Block a user