Im working on a rendering plugin, and im looking for the best way to track the lifetime of various objects in the scene.
Currently im looking at Meshes (PolygonObject), Materials and Textures.
What would be the best way to check if objects have been removed and added to a scene?
According to the documentation I should not use pointers, but baselinks. But I cannot compare baselinks with eachother.
I have also read that the various ID functions are not always unique for all objects.
BaseLink are preferred because you can use AliasTrans and/or TransferGoal to update them.
There's no real one solutions to track when an object is modified in a scene.
For example, when an object is inserted, the following message is sent: MSG_DOCUMENTINFO_TYPE_OBJECT_INSERT
There's also the coreMessage EVMSG_CHANGE but you have to parse the hierarchy yourself and compare with one that you stored.
That's true that sometimes (specially when you are dealing with mograph's object) UniqueIP isn't always the same or some parameters aren't transferred. It can be even worst when the mograph object is in mode Render Instance or Render Multi-instance
What's really hard is to deal with many special cases.
I would suggest to ask your question as you find yourself stuck.
welcome to the forum and thank you for reaching out to us. Please notice that we have to ask for a specific form in which postings are made here, in order to deliver the best support possible. You will find the postings rules here and a guide on how to use the forum here.
In your case specifically tags regarding the operating system, the programming environment and the version of Cinema you are using are missing. Please add them, or otherwise it will be very difficult to answer your question.
Thank you for your understanding
without further feedback, we will consider this thread as solved by tomorrow and flag it accordingly.