Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
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 19-10-2006, 01:57 PM   #1
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default Obtaining Data From Graphs

Hi Guys

Is there any way to get a set of data from a graph in maya, for example a data series of the points of which keys are set so that the data series is as follows

Time (frame) Translate X Value
1 10
5 12
7 15
17 17


etc etc

Since the values are there to make up the graph is there a MEL script that can extract there values into a series of values likethe above example?

Hope this makes sense.

Cheers

Steve
__________________
"No pressure, no diamonds" Thomas Carlyle
gster123 is offline   Reply With Quote
Old 22-10-2006, 01:13 AM   #2
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

If I understand properly then you can do something like this:

float $timeArray[] = {};
float $valueArray[] = {};

int $nextIndex = size($timeArray);
float $currentTime = `currentTime -q`;

string $myObject = "pCube1";

$timeArray[$nextIndex] = $currentTime;
$valueArray[$nextIndex] = `getAttr -t $currentTime ($myObject + ".tx")`;



A
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 22-10-2006, 06:14 PM   #3
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Nice one A!

Cheers for that, i'll give it a whack. If I get stuck will the help files give me some pointers to the attributes that your calling and the functions?

Very new to mel (have used Delphi and C++), only used the noise and random functions to animate things!


Cheers
__________________
"No pressure, no diamonds" Thomas Carlyle
gster123 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-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.