Capturing a value from the Output Window

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  06 June 2008
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.
  06 June 2008
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}
  06 June 2008
Thanks for your suggestion Nkls
  06 June 2008
Thumbs up cmdFileOutput

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

  06 June 2008
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 07:27 AM.

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