Introduction to Maya - Rendering in Arnold
This course will look at the fundamentals of rendering in Arnold. We'll go through the different light types available, cameras, shaders, Arnold's render settings and finally how to split an image into render passes (AOV's), before we then reassemble it i
# 1 19-10-2006 , 12:57 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300

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
# 2 22-10-2006 , 12:13 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
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")`;


user added image
A


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 3 22-10-2006 , 05:14 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
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
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