wireframe render

A script for rendering wireframe. Originally posted at http://www.artbycrunk.com/blog/2008/09/rendering-wireframe-using-toonshader/#content

/* *******************************
******************************* 

Toon Wireframe Render 1.0

Created On Mar 13th 2009
Authored By - Crunk AKA Savio Fernandes
Mail - artbycrunk@gmail.com
Website - www.artbycrunk.com/blog/scripts/

Install & Execute:
-Copy this file to your maya default script directory
-Source "crToonWireframeRen.mel"

Description:
This scripts basically is an extension of my wireframe render tutorial, which uses toon shader.
It gets quite annoying after sometime, doing same settings again and again. So this does it in a Click! :)

*******************************
********************************** */

global proc crToonWireframeRen()
{

	if (`window -q -ex TWRWin`) deleteUI TWRWin;
	window -title "crToonWireframeRen" -w 230 -h 95 -s 0 TWRWin ;
	columnLayout -adjustableColumn true;
	button -h 48 -l "Assign Wireframe" -c "TWR_AssignWire";
	button -l "About/Usage" -h 20 -c("AboutTWR") but_about;

	showWindow TWRWin;

}

global proc TWR_AssignWire() {

assignNewPfxToon;
string $pfxtoon[] = `pickWalk -d up`;
string $pfxToonShader = `rename $pfxtoon[0] "crWireframeShader"`;
string $pfxToonShape[] = `pickWalk -d down`;

setAttr ($pfxToonShape[0]+".profileLines") 0;
setAttr ($pfxToonShape[0]+".borderLines") 0;
setAttr ($pfxToonShape[0]+".creaseLines") 1;
setAttr ($pfxToonShape[0]+".hardCreasesOnly") 0;
setAttr ($pfxToonShape[0]+".creaseAngleMax") 0;
setAttr ($pfxToonShape[0]+".creaseAngleMin") 0;
setAttr ($pfxToonShape[0]+".creaseLineWidth") 0.5;

}

global proc AboutTWR()

{
  string $aboutwindow = `window -title "crToonWireframeRen 1.0" -iconName "Short Name" -s false -widthHeight 480 267 AboutTWR`;
  columnLayout -adjustableColumn true;
  text -label "crToonWireframeRen 1.0";
  text -label "Created by Crunk";
  button -label "www.artbycrunk.com\\blog" -c ("showHelp -a \"mailto:artbycrunk@gmail.com\"; ");
  text -label "";
  button -label "Close" -command ("deleteUI -window " + $aboutwindow);
  setParent ..;
  showWindow $aboutwindow;

}

crToonWireframeRen();
I wish to do something Great and Wonderful, but I must start by doing the little things like they were Great and Wonderful”
~ Albert Einstein