[Closed] a strange thing when call GetNodeTM() in NotifyRefChanged function
Hello all, heres 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 dont 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 its updating its TM. Dont 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 dont know how to get when its TM is not updating.
Can you help me?