why is this forum so slow to update? I posted a topic on Friday and I don't 
see it till Tuesday morning and then i replied to this a few hours ago and 
it doesn't appear....is it just me?
I wanted to get to the console window, Everytime I render a frame in the 
GUI I get a glorious amount of data in the console and I wanted to get 
access to it to do some graphs and plots. 


On Tuesday, March 6, 2012 5:14:25 AM UTC+11, Justin wrote:
>
> Do you mean the script editor? First you should check if you can actually 
> just catch the output of the commands you are running. If the output is 
> completely out of your control and you really do want to capture what the 
> script editor is spitting out, then you can register a callback using the 
> API...
>
> ### code start ###
>
> import maya.OpenMaya as om
>
> def catchOutput(msg, *args):
>     with open('maya.log', 'a') as f:
>         f.write("Caught: %s\n" % msg)
>
> # set the callback and save the id
> catchOutput_id = om.MCommandMessage.addCommandOutputCallback(catchOutput)
>
> # use the id to remove the callback later
> om.MCommandMessage.removeCallback(catchOutput_id)
>
> ### code end ###
>
> Obviously you would do something else, rather that just logging it to a 
> file. Don't do any printing in that callback, as I have noticed it 
> generates a recursive loop and crashes maya.
>
>
>
> On Fri, Mar 2, 2012 at 2:25 AM, Mark Serena <[email protected]> wrote:
>
>> *[Sorry if this is a duplicate didn't see it on the main page a day 
>> later]*
>>
>> Hey guys,
>>
>> Is there a way to extract information from the output window? I want to 
>> do some graphing/plotting.
>>
>> Thanks
>> Mark
>>
>> -- 
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings: 
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to