Maya 2012 script console, auto clearing..bug?

For some reason my Script console auto clears every time I’ve run anything.
Its been like this since it was installed.
The only way I’m able to see feedback is to run a script with the scriptEd closed and then open it afterwards to see the output…
Is this a new feature or a bug, has anyone else experienced this have you got a fix, its driving me nuts.

cheers all

do you highlight it first? I noticed I have to highlight my text or use ctrl+a to select it then run it, else it clears.

hmm… Oh sorry I’m talking about the top History section.

I’m running script from UI’s, so expect to see feedback as its always done, this must be a bug then, tis a bit crap like…

Do you mean that the history clears or the input box clears?

(edit, you posted as I was posting. Agreed, must be a bug of some sort.)

The History clears…

and it only affects your scripts? Does echo-all and using usual maya buttons/commands behave the same way?

Yeah its like there’s something somewhere that’s got jammed into auto clearing the history for everything.

Do you have any 3rd party stuff installed? Have you tried running without proprietary scripts?

My apologies if you already know this, but you can write your script history to a file, and have that file open in an editor (as a work-around until the bug is sorted out)


import maya.cmds as cmds
 
 
#Turn on file writing to the default file (if historyFilename isn’t a blank, it will write to the file specified)
cmds.scriptEditorInfo(historyFilename='', writeHistory=True) 
 
 
#Show what file the history is being written to:
print ('History being written to: ' + cmds.scriptEditorInfo(query=True, historyFilename=True) )
 

In case you can’t see it, the default script history location is:
C:\Users\psheets\Documents\maya\scriptEditorHistory.txt

You can just set writeHistory=False to stop logging to the file, or there is also a clear parameter if you want to clear the file, etc.

The script editor report (history) window can be referenced by the MEL variable $gCommandReporter. So (assuming you can see the output :)) you can look at some of the parameters of the editor window. For example, you can make sure that suppress warnings, info, error, and results aren’t all turn on or something:


//MEL code
//See if script editor history is suppressing results
cmdScrollFieldReporter -q -sr $gCommandReporter;
 
//See if script editor history is suppressing info
cmdScrollFieldReporter -q -si $gCommandReporter;
 
//See if script editor history is suppressing errors
cmdScrollFieldReporter -q -se $gCommandReporter;

I doubt that is your problem since it sounds like the data is being written and then cleared, but I figured I’d throw it out there - I noticed that the checkboxes for suppressing the info don’t become checked when you suppress through script, so they can be secretly suppressed. Which makes for a great practical joke if you feel like supressing someone else’s history.

Phil

Wow that’s a great tip! Thanks Phil!