Take this example:
Let’s take very simple DG setup. A locator whose transform is connected to two compute nodes (spliceMayaNode1 and spliceMayaNode2), each of which computes something heavy. The results are then added together in a third node (spliceMayaNode3) from the plugin, and that result drives a locator.
The nodes use dynamic attributes so you have to use setDependentsDirty() to declare the outputs that are affected by which inputs. If you comment out the code that adds plugs to the output array in setDependentsDirty() the nodes spliceMayaNode1 and spliceMayaNode2 can be called from separate threads; however, spliceMayaNode3 will never be executed, presumably because the EvaluationManager won’t think anything can ever make it dirty. However when the output plugs are appended, the nodes spliceMayaNode1 and spliceMayaNode2 are always evaluated from the same thread.
To overcome this issue, you have to make your plugin node as thread-safe for parallel DG Evaluation. You can explicitly use the MEL command setNodeTypeFlag.
Comments
You can follow this conversation by subscribing to the comment feed for this post.