Skip to content

Instantly share code, notes, and snippets.

View JustinPedersen's full-sized avatar
🐑

Justin Pedersen JustinPedersen

🐑
View GitHub Profile
@JustinPedersen
JustinPedersen / ChannelDivider.mel
Last active July 23, 2017 20:24
Channel Divider created by: Justin Pedersen For The animation school
/*
Channel Divider created by: Justin Pedersen For The animation school
justin@tcgcape.co.za
Ver: 001
Date: 7/12/2017
Maya ver: 2017 update 4
NOTE: REorder attrs section origionally
Michael B. Comet - comet@comet-cartoons.com
@JustinPedersen
JustinPedersen / StandardDivider.mel
Last active July 23, 2017 20:26
Standard Divider Proc
proc StandardDivider(){
string $Selection[] = `ls -sl`;
$selSize = size($Selection);
if($selSize == 0){
warning "please Select at least one control";
}else{
for ($Attrs in $Selection){
string $Ver = "v2";
string $WinName = ("AutoReverseLockFoot_" + $Ver);
if (`window -exists ("AutoReverseLockFoot_" + $Ver)`)
deleteUI ("AutoReverseLockFoot_" + $Ver);
window -title ("AutoReverseLockFoot." + $Ver) -s false -rtf true ("AutoReverseLockFoot_" + $Ver);
frameLayout -w 190-h 100 ("Sheep's Auto Reverse Lock Foot " + $Ver);
rowColumnLayout -nc 1 -cw 1 200;
// NOTES
// add set all to default
// ============================================================================================================== //
/* ============================================== CREATING WINDOW =============================================== */
// ============================================================================================================== //
if (`window -ex AttributeMaster`)
deleteUI AttributeMaster;
// pre roll script for Astra
// Coded by Justin Pedersen
if (`window -ex PreRollScript`)
deleteUI PreRollScript;
window -wh 200 200 -s 1 PreRollScript;
frameLayout -l "Pre Roll Script";
columnLayout -cw 1;
/*
Axle Finder
Select two edge loops on a mesh and run the script.
A locator will be created in the center of the two pieces with the correct axle.
*/
string $Edges[] = `ls -sl`;
int $SelSize = size($Edges);
for($E=0; $E<$SelSize; ++$E){
select -r $Edges[$E];
polyToCurve -form 2 -degree 1 -n ("PollyToCurve" + $E);
string $Win = "OutlinerDivider";
if ( `window -exists $Win` ) {
deleteUI $Win;
}
int $w = 80;
int $h = 40;
window -t $Win $Win;
frameLayout -l "Outliner Colour Divider creator";
rowColumnLayout -nc 4;
button -w $w -h $h -l "" -bgc 0 0.9 0.2 -c "Create($Colour = \"green\")" green;
//=============================================================//
/*===================ASTRA COLOUR DIVIDER======================*/
//=============================================================//
//======== Colour divider created by Justin Pedersen ==========//
//================== Justin@tcgcape.co.za =====================//
/*=============================================================*/
string $Win = "OutlinerDivider";
if ( `window -exists $Win` ) {
deleteUI $Win;
}
ionstring $renderViewName = "renderView";
string $Path = "F:/scene4_Particles/images/";
string $Format = "png";
string $Title = "Sc04_Sh16_particles";
string $name = ($Title + "000");
int $Start = 40;
int $End = 116;
// pre roll script for Astra
// Coded by Justin Pedersen
if (`window -ex PreRollScript`)
deleteUI PreRollScript;
window -wh 200 200 -s 1 PreRollScript;
frameLayout -l "Pre Roll Script";
columnLayout -cw 1;