Hacker News new | ask | show | jobs
by pronlover723 1263 days ago
This is one of the things I used to like about Maya. It appeared to be a command driven editor and everything you did in the UI translated to a command line command. You could set it to show the commands and even capture them and use them as a start for generating a script

I don't know if it's still that way after the transition from Mel to Python. I haven't used Maya in 15 years

Even more, Maya also was like a 3D editor OS/Engine. The UI itself was written in the scripting language (~1500 melscript files) using the primitives from the "engine".

2 comments

Never used Maya, but what you describe sounds like something that's common in CAD software. I imagine this was spearheaded by AutoCAD and is a natural consequence of using Lisp as the underlying command/extension language :).

Two other applications that may be structured similarly are GIMP and Audacity (the audio editor). I say may, because I never looked under the hood to check on the internal architecture, but both also ship with an embedded Lisp interpreter for automation and extension, that integrates deeply with the tool's features.

Interesting! This is how I design all of my software.

Do you know the term for this pattern? Is it simply the "Command pattern"? I called it "User Methods" once (https://breckyunits.com/user-methods.html), but was never crazy about that term.

It is the command pattern with the added stipulation that there must be some way to represent every command as a simple command line like expression. MelScript commands look a lot like shell commands.

Maybe that's not a requirement. Adobe products will export commands as JavaScript and you can (could?) script most of their tools.

https://helpx.adobe.com/photoshop/using/scripting.html

The difference there is it's an afterthought vs Maya where the UI you interact with is literally implemented in this scripting language, all of which is editable if you want to customize it.