Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 01-02-2003 , 12:21 AM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198

Debug dilemma

Debugging per particle expressions is pain in the butt when you have lot's of stuff affecting things. I figured if I just could export the data out of few particles in to a text file and import that in a spread sheet program like excel (i use star office). This way I could get a graph out of virtually anything. So I though I could create a shelf button (thanks danny for the idea) labeled "Export debug data". But I ran in to a problem. Take a look at the code and you'll see what I mean.

Code:
global proc oceanDebug()
{
	string $fileName = ( `internalVar -userTmpDir` + "debug.csv" );
	int $fileId=`fopen $fileName "w"`;

	int $rangeMin, $rangeMax, $i;
	$rangeMin = `playbackOptions -q -min`;
	$rangeMax = `playbackOptions -q -max`;

	for($i = $rangeMin; $i <= $rangeMax; $i++)
	{
        	currentTime $i;
        	// Here comes the problem...
        	string $debugData = "Hmm... I can't access per particle attributes from here, can I?\r\n";
        	fprint $fileId $debugData;
	}

	fclose $fileId;
	print "Debug data exported successfully.\n";
}


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!

Last edited by kbrown; 01-02-2003 at 11:44 PM.
# 2 01-02-2003 , 12:55 AM
mark_wilkins's Avatar
Registered User
Join Date: Jan 2003
Posts: 161
Sure you can.

What you need is the "getParticleAttr" command. It's all explained in the MEL Command Reference.

-- Mark


Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com
# 3 01-02-2003 , 12:57 AM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Ah, the missing piece of my puzzle... Thank you very much!


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
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