Hey guys - thanks for all the replies!
I’m still learning maya’s underlying philosophy, coming from 3dsmax, and this problem is keeping me busy for a while now and I have a hard time explaining it even to long-time maya-users.
Maybe my approach is not maya-esque or it’s not necessary grasp maya down to its guts to work with it efficiently.
The scenario that I’m trying to solve is this:
[ul]
[li]I play around with nCloth, or something similar and end up with a setup that I like.
[/li][li]I might have fiddled with the DG nodes a bit, so just duplicating the DAG nodes won’t cut it.
[/li][li]I want to duplicate that setup, to get more cloth-pieces or use it as a base and extend it.
[/li][li]For this, all selected nodes need to maintain their relative connections AND stay connected to unselected nodes without duplicating those
[/li][li]I need a solution that works on any DG/DAG setup, not just nCloth.
[/li][/ul]
I’m working on a script now to duplicate the entire graph and then delete former unselected nodes and rebuild the connections properly.
However this is quite complicated already. I need to work with callbacks to identify nodes that were created during the copy and I cannot duplicate DG nodes and DAG nodes in one operation.
With so many hoops to jump through, I get the impression that I’m approaching this from the wrong angle.
[QUOTE=mattanimation;16723]I think this is a perfect example of when you WOULD want to use a script to duplicate something since you DO need to specify which nodes need to be duplicated and which not.[/QUOTE]
I want the selected nodes to be duplicated - nothing else and I get that far with duplicate or assets, but it breaks most connections.
[QUOTE=cedricB;16726]On Cgtalk someone have mention to make a copy of your scene ,deleting unwanted node then merging it back where you need.[/QUOTE]
That seems like a more complicated way to achieve the same result as “duplicate special” with “duplicate input graph” enabled. I still need to go in, delete dozens of nodes and manually rebuild dozens of connections.
[QUOTE=marcuso;16730]Your best bet might be to build your setup in a separate scene, and reference in as many copies as you like.[/QUOTE]
In this case, I’m just copying the nodes as a base to build upon - a quick way to use one graph as the starting point for another. I might duplicate the solver, but want it to connect to the same colliders as the first solver.
In my attached screenshot from thinking particles, you can see how it keeps duplicated nodes connected relative to each other - I only need to rebuild reconnect nodes that weren’t duplicated. It’s not exactly what I need, but it allows for quick iteration and experimentation.
[QUOTE=thirstydevil;16734]What can you do?
You write your own duplicate callback that __postDup is fixing your issues, that is if the other Asset duplicate issues no longer exist or you can create an asset that doesn’t have them.
You reference or import your asset multiple times.[/QUOTE]
Yep, I’m working on that script now, but like I mentioned above, it seems like an unnatural way of working with maya, like I’m forcing it to do something that it’s not supposed to do.
Assets would’ve been exactly what I was looking for - if only they could be duplicated without falling apart.