Badgerow
03-17-2009, 12:27 AM
Hello all,
Please excuse the ignorance of this question, but I am wondering how it is possible to grab and store the output/result of a constraint command inside of a mel script. For example, if I want to use a pointConstraint to snap something, then delete it, I would need to grab the name of the created pointConstraint and then use it to delete it:
global proc snapAndDelete {
string $select[] = `ls -sl`;
$howMany = size($select);
if ($howMany > 2) { error "More than 2 selected"; }
pointConstraint;
//Here is where I need to get the name of the constraint created, and then delete it
}
Anyone know how to do that? Help is hugely appreciated
-Badgerow
Please excuse the ignorance of this question, but I am wondering how it is possible to grab and store the output/result of a constraint command inside of a mel script. For example, if I want to use a pointConstraint to snap something, then delete it, I would need to grab the name of the created pointConstraint and then use it to delete it:
global proc snapAndDelete {
string $select[] = `ls -sl`;
$howMany = size($select);
if ($howMany > 2) { error "More than 2 selected"; }
pointConstraint;
//Here is where I need to get the name of the constraint created, and then delete it
}
Anyone know how to do that? Help is hugely appreciated
-Badgerow
