Nodes should not be aware of the dag*, that would be a violation of architecture. Everything you get form this is just pain and misery. In essence all you end up with is less nodes but still as many connections, or you risk maya rejecting you big time.
I am stuck at how I can read in joints and get their dagPath.
You dont really need this info either, all you need is a matched connection pair.
Any idea on this?
well it makes sense to make it obscure to violate design. You can do this no doubt maya doesnt stop you form vialating design but your life gets painful when you do. Be aware thet you end up debugging a lot of issues that are really obscure when it comes to updating your data if you work outside the dg.
I have already written a simple node to interpolate between two matrices which I can use for each joint of the chain
Well yes however maya authors already wrote that node for you.
it is really cumbersome to create tons of this node
You mean that a for loop is cumbersome? Thats what the scripting interface is for. The division of labour in maya is as follows:
you make a node that follows the design.
Then you publish a script that initiates the user interface
the script handles setting up the normal case.
Now if you do it this way then the inputs in 2 are inputs for the setup script, in which case your node needs not know anything about teh dag inside your node. And no big need of making it one node or making a extra node at all you can just use off the shelf nodes. Reducing your work to a simple script. Its infinitely better form maintenance point of view.**
- there is a exception to this rule, but even it is not aware of the address and thats a ik solver node. However the ik solver has a special evaluation phase.
** yes you end up having a lot of connections, but no matter how you do youd still end up with that you just waste weeks of work trying to hide the connections and supply inferior interfaces. Or you can jsut mark the nodes as auxilliary and thay wont show up.