Testing your commands on osx actually crashed Maya while its starting up. I
assume what you would need is to schedule the call to be made once Maya has
finished loading and returns to its idle state:
## userSetup.py ##
import maya.cmds as cmds
import maya.utils as mutils
def hist_callback():
path = '/Users/justin/Desktop/Script_Editor_History.txt'
cmds.scriptEditorInfo(historyFilename=path, writeHistory=True)
mutils.executeDeferred(hist_callback)
del hist_callback
On May 19, 2013, at 8:42 PM, Ævar Guðmundsson wrote:
>
> This little godsend here:
>
> maya.cmds.scriptEditorInfo( historyFilename='Script_Editor_History.txt',
> writeHistory=True )
>
> Writes out into a textfile everything I, you, or anyone else executes in the
> Maya script editor. Even though the commandExecuter files are "records" of
> what the text in the tabs is, this one is the history. Query the location of
> the file as such:
>
> maya.cmds.scriptEditorInfo(query=True, historyFilename=True)
>
> and all is well.
>
> Now, if I run this in my userSetup.py file, nothing happens so I have to keep
> remembering to turn on the history log each time I open Maya. How do I set
> it so that the history log is always on when I start Maya?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.