Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 01-02-2003, 12:21 AM   #1
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default 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.
kbrown is offline   Reply With Quote
Old 01-02-2003, 12:55 AM   #2
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
mark_wilkins is offline   Reply With Quote
Old 01-02-2003, 12:57 AM   #3
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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!
kbrown is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.