More fun with Python transformations

More fun with Python transformations

dan.husted
Enthusiast Enthusiast
684 Views
2 Replies
Message 1 of 3

More fun with Python transformations

dan.husted
Enthusiast
Enthusiast

I would like access the local transformation matrix for a given node.  My immediate need is to know if a node has an identity transformation, but I would like to the general process for accessing node data.  The getWorldTransformation function will retrieve the global position of the node, but I am interested in the position data for the node itself.

 

I am currently able to access all the data in the "attachments" section of a node, but I an struggling to get to the "matrix" and "isIdentity" fields.  And in general, how do I access the data for which there is no direct API?  The node editor is a pretty good tool for seeing the node data, but accessing the data seems a bit cryptic to me.

 

Thanks in advance for ant help you can provide.

0 Likes
Accepted solutions (1)
685 Views
2 Replies
Replies (2)
Message 2 of 3

j.kaestle
Enthusiast
Enthusiast
Accepted solution

Hi,

try this:

matrix = node.fields().getMatrix("matrix")

It's working fine in my script.

The isIdentity field should be accessable in the same manner.

 

best regards

Jochen

 

0 Likes
Message 3 of 3

dan.husted
Enthusiast
Enthusiast

Jochen,

 

Thanks so much for your response.

 

I would have sworn I had tried that combination among the dozens I when through.  But this worked.

0 Likes