Skip to content

Instantly share code, notes, and snippets.

@jankosh
Created May 15, 2018 20:47
Show Gist options
  • Save jankosh/81f870f972620cf4b96134b5428db723 to your computer and use it in GitHub Desktop.
Save jankosh/81f870f972620cf4b96134b5428db723 to your computer and use it in GitHub Desktop.
MEL Skript pro vytvoření NURBS koule ze tří NURBS kružnic
/** MEL Skript pro vytvoření NURBS koule ze tří NURBS kružnic
*
* @author Tomáš Jankó / http://jankosh.com
*
*/
proc string createNurbsCircleForSphere( int $x, int $y, int $z ) {
string $circle[] = `circle -c 0 0 0 -nr $x $y $z -sw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -ch 1`;
return $circle[0];
}
proc string reparentNurbsCircle( string $parent, string $child ) {
string $shapename[] = `listRelatives -s $child`;
parent -r -s $shapename[0] $parent;
select -cl;
select ($child);
delete;
return $shapename[0];
}
string $circle_1 = createNurbsCircleForSphere( 0, 1, 0 );
string $circle_2 = createNurbsCircleForSphere( 1, 0, 0 );
string $circle_3 = createNurbsCircleForSphere( 0, 0, 1 );
reparentNurbsCircle( $circle_1, $circle_2 );
reparentNurbsCircle( $circle_1, $circle_3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment