Notifications
Clear all

[Closed] a strange thing when call GetNodeTM() in NotifyRefChanged function

Hello all, here’s my problem:
I call GetNodeTM() method of the referenced objet in my NotifyRefChanged function
when message==REFMSG_CHANGE and partID&PART_TM_CHAN==true,
but position of the referenced object is wrong.
However, if I don’t call GetNodeTM() method, position of the referenced object is normal.

To make it clearer

original state : X = 0 Y= 0 Z= 0

I type “1” in X
I get : X = 1 Y = 0 Z = 0

I type “2” in Y
I get X=1 Y = 0 Z= 0

I type “3” in Z
I get X=1 Y=2 Z=0

It looks like the matrix of the object is updating when NotifyRefChanged is called,
and GetNodeTM() will make the matrix use the value before updating.

I find a flag A_INODE_IN_UPDATE_TM in animtbl.h,
the brief is “Flag is set if it’s updating it’s TM. Don’t Call GetNodeTM if it is.”.
Then I call the function INode::TestAFlag(A_INODE_IN_UPDATE_TM), but it seem of no use, it always return FALSE.

Now, I try call GetNodeTM() in another thread, but I don’t know how to get when it’s TM is not updating.
Can you help me?