@david :
wow , this is a SUPER-INFORMATION !!! thank you a lot , i should have 
know this before !

"closing" the  script-editor-window ( instead of just minimizing it ) 
really seems to work !!! that is a great-info !!! so , i now know this , 
for the future !

----------------------------------------
i just tried it --- with this simple script

( before i sourced it -> I closed and re-opened the script-editor-window 
- to see , if the code will be "really" saved as you say )

[code]
$i = 0;
while ($i<1)
{
print "test";
}
[/code]

------------
so , when i started the script ... maya got into the  "infinite-loop" , 
and i used the task-manager to close maya ... after re-starting maya , 
the code was "still" in the script-editor .

super !!!

@deanEdmonds:
for some reason , i never liked the idea of using the 
"commandPort-command" in order to send scripts , from a text-editor to 
maya ( i dunno know why , but it is just the "feeling" is not the same , 
than sourcing in the script-editor - maybe ) . also , i always used 
jEdit a lot in th past - for editing MEL-scripts , as the script-editor 
never had possibilities to "edit" text . so i often went front and back 
, from jEdit to script-editor and vice-versa and always had a "copy" of 
my code in jEdit .

but since maya8.5 , there are "search-and-replace" , multi-tabs for MEL 
and PYTHON , and also it saves the scripts when "closing maya ( properly 
) " and other main-text-editor-functions in the script-editor - however 
, since maya8.5 , i did  not find it neccessary anymore ... to use jEdit 
so much - than i used to use it .

-------------------------------
anyway , David just mentionend a "VERY INTERESTING ASPECT" about the 
script-editor , and i am very grateful to him ;) thanx, David


David Aguilar schrieb:
> On Sat, Oct 4, 2008 at 6:21 AM, sim.On <[EMAIL PROTECTED]> wrote:
>   
>> hi Python users .
>>
>> i guess you all know this :
>>
>> you write a script in MEL or PYTHON ... you go on working and working
>> - and you forget to save your script ... SUDDENLY maya crashes.
>>
>> e.g. the work for 4 hours ( IN SCRIPT EDITOR ) scripting is gone .
>>     
>
> I have found the following to be the case for the script editor in the
> copy of maya we have at work:
>
> if you write stuff in the script editor, maya will save its contents
> whenever you close the script window.  So, simply closing it and
> re-opening it should trigger a save.  I have found this to be the case
> for 8.5 and newer.  Our on-site maya engineer mentioned this to us
> some time ago and so far I've found it to be the case.
>
> Of course, I wouldn't rely on maya for a text editing.  The better
> solution is to package your stuff up in a module and use the script
> editor for purely throw-away stuff.  Something like this:
>
> # the_module.py -- edit this in vim, emacs, or any good $editor with
> syntax highlighting
> # ======================================================
> class Example(object):
>     def good(self):
>         print "ya"
>
> # for_maya_script_editor --
> # ======================================================
> # use this in the maya script editor.  This is purely throw-away stuff
> that's okay to lose.
> # the reload() is used so that it picks up any changes you make to the module.
>
> # make sure the module dir is in your sys.path -- sitecustomize.py is probably
> # the right place for this snippet, though
> import os
> import sys
> moduledir = os.path.dirname('/path/to/the_module.py')
> if moduledir not in sys.path:
>     sys.path.insert(0, moduledir)
>
> # now, use the module
> import the_module
> reload(the_module)
> the_module.Example().good()
>
>
> So, now that you don't need to use the maya script editor for real
> editing you don't really need it to track history for you, either.
> Tracking history is best left to scm tools designed to do just that.
> For example, http://git-scm.com/ -- http://git.or.cz/ are all the rage
> these days, and are highly recommended.
>
>
>   
>> QUESTION:
>> does maya somewhere store the "history" of the script-editor in one of
>> the windows-temporary-directories ?
>>
>> or might my "code" still be in my RAM somewhere , and i might find it
>> with a "HEX-editor" or any kind of MEMORY-search ???
>>
>>
>> -----------------------------------------------------------------
>> does anyone ever found out , how to deal with this problem ?
>>
>>     
>
>
>
>   


--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to