node id
Created by: ly29
Now that we started working with more than one layouts we should provide a standard safe way to get a hash that is unique over many node groups. This is needed for all nodes that have side effects or use a data cache. Like Text In&Out, Viewer, Index Viewer etc. Right now it looks like this in the updated Viewer node.
n_id = self.name+self.id_data.name
Which will work most of the time but could lead to errors if a user rename the layouts or nodes. I am thinking something like this as a standard way.
def node_id(node):
return hash((node.name,node.id_data.name))
Or is there something built into blender already that would work. The other options is to use two levels of dicts.
ps Also the socket_id function in util py should be updated to something similar to be safe.