Introduction to Maya - Modeling Fundamentals Vol 2
This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with complex objects.
# 1 20-08-2004 , 11:58 AM
ade90054's Avatar
Registered User
Join Date: Oct 2002
Location: England
Posts: 143

Nurbs curves visibility?

Hi all,
Just wondering if someone could help me, i'm trying to make a simple script that allows me to press a key to turn off nurbs curves visibility, then when i press the same key again it turns them back on again, any ideas would be cool,
Thanks, Jimmer.

# 2 20-08-2004 , 02:53 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
assign two hotkeys next to each other one to turn on one to turn off visibilty. you dont really need a script to do it.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 3 23-08-2004 , 12:55 PM
ade90054's Avatar
Registered User
Join Date: Oct 2002
Location: England
Posts: 143
Thx dude,
Unforfunately this is what I already had setup, I'm just being picky really, you know when you wanna do something but dont know how & it starts to bug you? Well thats where I am at the moment user added image
Thx anyway

# 4 23-08-2004 , 01:24 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Here ya go. Save the following code in a file called tglCurveVis.mel and create an user hotkey assignment as shown in the attached image...

Code:
global proc tglCurveVis()
{
	string $sCurves[] = `ls -typ nurbsCurve`;
	string $sCurve;
	global int $iCurveVis;

	for($sCurve in $sCurves)
		if($iCurveVis)
			setAttr ($sCurve + ".visibility") 0;
		else
			setAttr ($sCurve + ".visibility") 1;

	$iCurveVis = !$iCurveVis;
}

Attached Thumbnails

Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 5 23-08-2004 , 01:29 PM
ade90054's Avatar
Registered User
Join Date: Oct 2002
Location: England
Posts: 143
Awesome stuff mate,
Thanks for that 1 user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads