In maya 2016 ext 2, alembic files can be referenced as usual reference nodes. This feature is convenient, but it's confusing while writing API command, especially for dealing with the alembic file path. It seems the same alembic file path is used for referencing and creating AlembicNode.
I used MSceneMessage::kBeforeCreateReferenceCheck to get the reference file path and altered it according to our need. But this only worked while referencing. Once it's referenced, the abc_File attribute of this AlembicNode, which is the same as reference file path, still remains the same. Hence, the alembic file path is not altered eventually.
I've also tried to use MNodeMessage::addAttributeChangedCallback to register an attribute callback to AlembicNode, but it seems this callback won't be triggered because maya treats this AlembicNode as referenced. However, this attribute callback is triggered while importing an alembic node.
So how can I register a callback event to alter the abc_File attribute of AlembicNode type reference? Any info will be appreciated, thank you.