Feedback

What's your question?

By: Asked

Creating maya nCloth & nucleus solvers using melscript

Hi everyone,

I have a quick question for you. Does anyone know how to create a nucleus solver using Mel and connect it to the nCloth Node?

There is no documentation because (according to Duncan) nCloth is driven entirely by calling other Mel scripts. I tried to find these scripts for dissection with no luck.

Currently I am able to create the nCloth Node and set its attributes but thats as far as I can go without the solver component.

$sel=`ls -sl`;
createNode nCloth -n "cloth" -p $sel;
setAttr "cloth.thickness" 3.21;

Any help would be greatly appreciated

Thanks

Mike

Add comment viewed 365 times Latest activity 11 months ago

or Cancel

1 answer

  • 1

julian [ Admin ]

The best way to figure out that kind of thing is to turn on Echo All Commands in the scriptEditor and make an ncloth through the menu. You'll see near the top of the output:

nClothCreate;
performCreateNCloth 0;
createNCloth 0;

Use the whatIs command to find out what they are and where they exist on disk if they are mel scripts.

whatIs "createNCloth" 
// Result: Mel procedure found in: /Applications/Autodesk/maya2011/Maya.app/Contents/scripts/others/createNCloth.mel // 

In that script you'll find where the nucleus is created, if it needs to be created, or returned if it exists already.

string $nucleus = getActiveNucleusNode( false,true );

And further down you can see how they are connected. Probably easiest is to just use one of those commands directly.

or Cancel