Problem: the Blender synchronization process creates and tags nodes for usage. It does
this by directly adding and removing nodes from the scene data. If some node is not tagged
as used at the end of a synchronization, it then deletes the node from the scene. This poses
a problem when it comes to supporting procedural nodes who can create other nodes not known
by the Blender synchonization system, which will remove them.
Nodes now have a NodeOwner, which has to be set on creation. Node creation is done through
an API at the scene level, which takes the owner as parameter. Before rendering, the Scene
will ask the various owners if a node should be removed, this is done via Scene::update_nodes.
When a node is removed, the scene tags the appropriate node manager for an update, freeing
this responsability from BlenderSync.
Concerning BlenderSync, the id_maps do not explicitely manipulate scene data and delete nodes
anymore, they now only keep track of which node is used and ask the scene to create nodes of
the right type. To achieve this, the ParticleSystem had to be turned into a Node, although it
does not have any properties/sockets.
Since every node has to have an owner, the Scene becomes the owner of the default shaders.
There is a slight synchronization issue when deleting an object in the Blender scene during
viewport render, where objects do not disappear immediately. To fix this an extra call to
Scene::update_nodes was added in the Blender session which isn't nice (ideally the session
should just create and update node data, without explicitely telling the scene to update the
nodes arrays).
This is part of T79131.