Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modern/Redesigned Script Editor

Modern/Redesigned Script Editor

(Copied from original User Voice forum)

 

"More options like autocomplete, wrapping lines of code, etc"

 

"There should be a save button that saves the contents of the script editor... maya hard crashes or hangs = script lost.

Shift tab should unindent the entire selection, not stop once a line that isn't indented is reached.

Using triple single quotes in python should highlight strings like using triple double quotes.

 

Some sort of debug mode that displays values of variables. If my script fails, I dont want to print a bunch of variables."

 

"Pasting something into the script editor from another program like PyCharm should not fail... I shouldn't have to paste into notepad and recopy to be able to paste into the script editor."

 

"At the minimum there should be a standard font selection w/ size etc panel."

 

"- Double-clicking a variable name should also select the "$" at the the beginning. 
- Right-click should have an option to print selected. I have hacked this in myself, but should be standard for de-bugging....or even better hover over variables to see their values like Visual Studio. 
- Script editor should save contents to temporary file before execution or allow user to do a quick save without having to go through a file browser. 
- Please make the Quick Help side bar re-sizable. At least increase the width so you can read the contents properly."

 

"- An option to collapse blocks of code 
- Easier access to changing the color scheme of the script editor 
- An on/off word wrap option. 
-A way to arrange tabs so that they can be seen side by side instead of only being able to view one tab at a time."

 

"The way it works now is "scary"... How tabs and the content of them are stored in the prefs and how it retains tab orders..etc. When you have more than 1 maya open right now and if you did any tab or tab content editing.. there is a very high chance you will loose those work either in the current maya session or the content from another maya session.. Its all hit and miss and there are things you can do to prevent it. But they are really terrible turnarounds. Like closing your script editor on one maya before opening it on the other maya. Or close and reopen the script editor so it stores your changes before opening the script editor of another maya... This is the most annoying part right now. We have to get this to work much more stable.

 

Also, we need some kind of Auto save function for all content in the script editor.

 

Also a few more changes. More font options (control of default text size, choose fonts, size of fonts in the history..etc like most text editor can do), customizable hotkeys for all things in script editor, tabs can be reordered by just dragging the tabs around, better search and replace. And an additional search option for the history section."

 

"*Code folding 
*Column/block Mode editing 
*single line comment, single line UN-comment, Block comment, Block UN-comment. 
*Variable highlighting 
*Convert case to UPPERCASE/lowercase 
*Goto-definition, refactoring, inline snippets 
*Macros"

 

http://zurbrigg.com/charcoal-editor

13 Comments
ajoss13
Participant

I would just suggest to license the Sublime3 engine and somehow build it into the Maya. Not sure if that's possible at all. It's already have all of that and tenfold more.

Anonymous
Not applicable

Or Visual Studio Code engine.

 

I'd be happy any real effort in modernizing the script editor.

 

It would be nice if the script editor worked the same in Maya and Bifrost. So if you learn the Script Editor once it was useful in more than one context.

tj.galda
Alumni

We like the idea too but there are some technical considerations we have to take in to account for something like sublime.  Sublime as an example uses a different version of Python & does not use QT:

https://stackoverflow.com/questions/7102378/what-gui-library-is-used-by-sublime-text-editor

 

I'm curious to know what are your favorite features & what's the priority order.

 

To be clear, we've got a long backlog right now and this won't happen in the short term.

tj.galda
Alumni
Status changed to: Future Consideration
 
berjb
Contributor

Would it be mean of me to ask for the ability to embed Vim? 😄

ajoss13
Participant

Tj - the list is just too long.

Starting from the fact that it's almost impossible to lose the text you've typed into Sublime even if you closing it without saving the file - it will just reopen the same windows with the same text on the next session. That's how it should work in Maya in theory, but it looks like Maya saves the script editor contents just when you closing it and saving preferences. And if you did something wrong or crashed Maya - all your lines are lost in the next session.

So it might be a good idea to write down the contents of scriptEditor to temp files every time user executing something(like in AE/Fusion for example, "save before render" option, they have it for a reason).

 

And things like tons of customizable options, multiple cursors, multipane views, tabs/spaces replacement, support for many languages at once(MEL, Python, C#), plug-ins, highlighters. Would be also nice to have some PyCharm features, like  pressing 'Ctrl-Q' will show you help on given function, sane autocompletion, search and replace, ctrl-click on function moving you to the it's definition.

 

It's just too much to list everything in here.

 

PS: Is it possible to keep the position of scriptEditor's horizontal splitter as user set it and not reset it on every window reopen?

https://i.imgur.com/7x0wgpQ.gifv

ajoss13
Participant

 Another annoyance: every time user executing some code from scriptEditor with keypad enter(at least), focus is being changed to main viewport and not getting back to the script. So you have to mouseclick the scriptEditor window before you can start changing your code. Every time, 50-200 times a day just because of that.

klaudio2u
Enthusiast

Charcoal Editor 2 is out. This is exactly how Script Editor should work and look like in Maya, anything less is not nearly good enough in my opinion.

 

Charcoal Editor 2 > https://vimeo.com/269249244

aerys.bat
Enthusiast

A good workaround would be providing official plugins for Sublime, VSCode, PyCharm etc. so that developers who want to use these tools don't have to fend for themselves.

Anonymous
Not applicable

I agree that Maya's script editor is quite lacking and can be quite frustrating to work with. It's quite infuriating to lose your code because of a crash. I made it a habit not to use Maya's Script editor for anything else than quick one-liners, because of this.

To workaround this issue you can use your favorite text editor and make it talk to Maya.

 

Here's one way to do it in PyCharm:

http://www.emeraldartist.com/remotely-execute-code-in-maya-using-pycharm/

 

Cheers!

g2m.agent
Collaborator

I prefer a VS Code or Pycharm plugin. it can do:

  1. Auto-complete (both Python and Mel)
  2. Syntax highlighting (both Python and Mel)
  3. Run code in Maya
  4. Easy to install and setup
Mark.M
Contributor

Another thing I've found a need for is the ability to search through the command history as well as the existing search through the input panel.

Mark.M
Contributor

Another idea is I would also like to see an option for the output to have syntax highlighting too so it is easier to distinguish between commands, warnings, errors etc.. when scanning through it.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report