SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Simple script for you all....
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 28-12-2002, 10:17 PM   #1
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default Simple script for you all....

To get this section rolling again, I wrote this SIMPLE script just now...
It just performs the initial first steps of starting the process of creating a simple instanced-poly-sphere-based modeling method.


/*START SCRIPT
'' (C) 2002 Izzy of Ragecgi.com
''
'' TITLE: "RagePolyChar.mel"
''
'' What it does:
'' Creates a start for a simple poly sphere character process.
''
'' USAGE:
'' Source the script from the script editor, then type:
'' "RagePolyChar" into the command line, and if you want,
'' select that text, and MiddleMouseDrag it to your chosen shelf
'' to make a shelf button to use it anytime:)
''
'' How it works:
'' It creates a basic poly sphere, then delete's half of it.
'' Then I instance the other half.
'' The script then turns on smoothShaded & Xray made for your perspective viewport,
'' it selects the original half, and sets the selection mask to
'' face component selection mode, and zooms in on it.
''
''
*/
global proc RagePolyChar()
{
//create a new instanced half poly sphere by Izzy as a mel study
polySphere -r 1 -sx 8 -sy 10 -ax 0 1 0 -tx 1 -ch 1;
// Result: pSphere1 polySphere1 //
select -r pSphere1.f[1:4] pSphere1.f[9:12] pSphere1.f[17:20] pSphere1.f[25:28] pSphere1.f[33:36] pSphere1.f[41:44] pSphere1.f[49:52] pSphere1.f[57:60] pSphere1.f[65:68] pSphere1.f[73:76] ;
delete;
//select the sphere half and instance it in negitaveX
select -r pSphere1 ;
instance; scale -r -1 1 1;
// Result: pSphere2 //
//make viewport Xray mode
modelEditor -edit -displayAppearance smoothShaded -activeOnly false modelPanel4;
modelEditor -e -xray 1 modelPanel4;
select -cl ;
select -r pSphere1 ;
//change the original sphere to face selection mode and zoom into it.
changeSelectMode -component;
hilite pSphere1 ;
autoUpdateAttrEd;
updateSelectionModeIcons;
setComponentPickMask "Facet" true;
updateObjectSelectionMasks;
updateComponentSelectionMasks;
FrameSelected;
fitPanel -selected;
}
//END SCRIPT

Download it here:
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 28-12-2002, 10:21 PM   #2
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

Any questions, or requests would be helpfull!

If the sphere is wrong, or if it would be better to start modeling with different span counts etc, lemme know, and I'll update it asap
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 28-12-2002, 10:25 PM   #3
Darkon
SM Alumni
 
Join Date: Jun 2002
Posts: 509
Thanks: 0
Thanked 1 Time in 1 Post
Default

Nice one Izzy, I'll give it a try tonight or tommorrow

Darkon
__________________
Red bellows of flame have blackened my stones
Convulsing my frame and cracking my bones
Hell's dragons of steel who roar in their chains
Crawl into my caves to suck out my veins.....

-The Mountain P.F.M.
Darkon is offline   Reply With Quote
Old 28-12-2002, 10:35 PM   #4
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

Thanks!
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 28-12-2002, 10:45 PM   #5
dannyngan
Registered User
 
dannyngan's Avatar
 
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Thanks: 0
Thanked 1 Time in 1 Post
Default

Damn, you beat me to starting a new thread. I was just about to do the same thing. Oh well.

Here's my first contribution to this thread. A couple of simple scripts that work best when mapped to hotkeys:

Code:
/*

--------------------

toggleXray v1.0

--------------------

Created: Dec 15, 2002
Modified: Dec 15, 2002

--------------------

Danny Ngan
dannyn@mac.com
http://www.dannyngan.com

--------------------

Toggles Xray mode on/off in the active view panel. Works best when mapped to a hotkey.

--------------------

*/


global proc toggleXray()
{

	$currentPanel = `getPanel -withFocus`;
	$state = `modelEditor -q -xray $currentPanel`;
	modelEditor -edit -xray (!$state) $currentPanel;

}
-----

Code:
/*

--------------------

toggleWireframeShaded v1.0

--------------------

Created: Dec 15, 2002
Modified: Dec 15, 2002

--------------------

Danny Ngan
dannyn@mac.com
http://www.dannyngan.com

--------------------

Toggles Wireframe on Shaded mode on/off in the active view panel. Works best when mapped to a hotkey.

--------------------

*/


global proc toggleWireframeShaded()
{

	$currentPanel = `getPanel -withFocus`;
	$state = `modelEditor -q -wos $currentPanel`;
	modelEditor -edit -wos (!$state) $currentPanel;

}
You can download them here if copy/paste doesn't work for you:

http://www.dannyngan.com/maya/mel/to...rameShaded.mel
http://www.dannyngan.com/maya/mel/toggleXray.mel
__________________
Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job

Last edited by dannyngan : 28-12-2002 at 10:48 PM.
dannyngan is offline   Reply With Quote
Old 28-12-2002, 11:03 PM   #6
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

NICE!!!!!

Thanks man!!!

These will come in HANDY for my hovership model I'm doing as we speak
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
Old 24-01-2003, 02:00 AM   #7
pitbull
Registered User
 
pitbull's Avatar
 
Join Date: Dec 2002
Posts: 125
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what does the script do?
__________________
:-)
pitbull is offline   Reply With Quote
Old 24-01-2003, 02:34 AM   #8
ragecgi
Super Moderator
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Thanks: 0
Thanked 13 Times in 12 Posts
Default

'' It creates a basic poly sphere, then delete's half of it.
'' Then it instances the other half.
'' The script then turns on smoothShaded & Xray made for your perspective viewport,
'' it selects the original half, and sets the selection mask to
'' face component selection mode, and zooms in on it.
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
ragecgi is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.