CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-30-2013, 05:45 AM   #1
DanJHale
New Member
portfolio
Australia
 
Join Date: Jan 2013
Posts: 1
Capturing camera data and exporting to text file

Hey there people,

I have 2 problems that I am trying to overcome with zero knowedge of scripting within Maya.

Problem 1:
I have a scene that has multiple cameras and I need to export just the camera data (XYZ, rotation, lense information, etc) to a seperate text file for sharing information between studios.
Problem 2:
I need a way to overlay the XYZ information of the camera that is in use in the output render.

If anyone can help me with this or point me in the right direction it would be greatly appreciated.
 
Old 02-02-2013, 04:02 PM   #2
gmask
Obfuscator
 
gmask's Avatar
gmask
Power Sitting
Topanga, USA
 
Join Date: Oct 2002
Posts: 6,937
Quote:
Originally Posted by DanJHale
Problem 1:
I have a scene that has multiple cameras and I need to export just the camera data (XYZ, rotation, lense information, etc) to a seperate text file for sharing information between studios.


Well you basically just need to bake all the channels on the camera into world space and then cycle through the channels getting the attributes and creating a spread sheet or sorts and then writing it to disc.

psuedo code..

Code:
in_frame=10 out_frame=90 current_frame=in_frame while current_frame <= out_frame spread_sheet_index=0; for channel in channels spread_sheet[current_frame,spread_sheet_index]= getAttr -t current_frame camera.channel spread_sheet_index++ current_frame++ save_spread_to_disk(spread_sheet,'/myfile.txt')


Quote:
Originally Posted by DanJHale
Problem 2:
I need a way to overlay the XYZ information of the camera that is in use in the output render.


http://download.autodesk.com/us/may...sUpDisplay.html



http://forums.cgsociety.org/archive...p/t-136112.html
__________________
blah blah blah

Last edited by gmask : 02-02-2013 at 04:12 PM.
 
Old 02-02-2013, 04:02 PM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:07 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.