CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 06-18-2008, 04:47 AM   #1
Brisbane, Australia
Join Date: Apr 2008
Posts: 41
Capturing a value from the Output Window


I'm trying to capture a value that is only being printed through Maya's Output Window. It's basically a motion blur plugin for Mental Ray that gives a normalised value based on the scene in the output window which you then have to transfer to an attribute of the plugin.

The output line looks something like this:

PHEN 0.3 info : [lm2DMV_v2] >> Max Displace -> 30 pixels

So what I'm after is the integer value between -> and 'pixels'. I want to be able to scan for it, capture it in a variable and then send it to a text field in my own GUI. Does anyone know how I can do the first two steps?

2 other questions that relate:

- Is there a command to clear the contents of the output window?
- How can one set mental ray's verbosity level via mel?

Thanks Kindly.
Old 06-18-2008, 07:47 AM   #2
niklas brandin
Räven AB
Gothenburg, Sweden
Join Date: Feb 2005
Posts: 82
I don't know how to access the output window, but a workaround would be to redirect the output of the rendering to a log file, and parse that file to obtain your value...

the "-log" flag of the Mayatomr command does that for you...

this is the way to set the verbosity level:
optionVar -iv "v_mrBatchRenderLogVerbosity" {0-6}
Old 06-19-2008, 07:13 AM   #3
Brisbane, Australia
Join Date: Apr 2008
Posts: 41
Thanks for your suggestion Nkls
Old 06-19-2008, 07:52 AM   #4
francisvega's Avatar
Creative Director
Madrid, España
Join Date: Jun 2003
Posts: 184
Send a message via MSN to francisvega
Thumbs up cmdFileOutput

I think cmdFileOutput command could be your solution . Check the mel script help for flags and examples...

Old 06-19-2008, 07:52 AM   #5
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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

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
Society of Digital Artists

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

All times are GMT. The time now is 04:56 AM.

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