a scripting interface

Hi!
I know in software development nowadays to request a scripting interface
Is often not a popular thing because folks generally say “hey I’m an artist
not a programmer” but I’ve been involved in animation now almost 20 years
and I can say although I’ve recently been studying programming
(Which makes scripting a breeze by comparison) I have to say I miss 2 things
In synfig. A list of hotkeys is the first (this may exist I just haven’t found it??)
and a scripting interface, the second.

My main reason for saying this is that when you consider pairing Synfig with other
3D software you have a potential productivity gain which is massive IF Synfig
had a scripting interface.

My first example example would be using Synfig in
rotoscoping. Consider the Maya Embedded Language and a function it has to
return values from a color or alpha of an image across a user specified grid of
samples. One could effectively automate tracing a profile of an object and with
the exported values animate (via a script) a closed b-line matten which could the be a
monochrome gradient and used to post process a depth of field for stop frame
animation or live action. So potentially by tweaking a copy of the footage you plan
to rotoscope and isolating a color you could this way automate the animating
to a point and more easily achieve something like “a scanner darkly”.

Finally if you consider how easily on can now extrapolate tracked points from
footage via software and frame by frame text files, having a scripting interface
available to synfig user would put the program in even bigger standing, especially
since the developers have had the foresight to have it output floating point color.

So my humble request is for a (hopefully extensive) scripting interface to be developing in Synfig.
I’m quite prepared to be involved in testing such a feature, so developers, just contact me

I love scripting too (as a programmer that tries to be an artist) and I agree with you on its need.
Which programming language are you learning? Maybe you can join us on taking care of the code?
Regarding to the hotkeys, we have this: synfig.org/wiki/Keyboard_Shortcuts
maybe a bit hidden in the wiki, but as you already have noticed, we are working on that.

Prepare a scripting interface is not a top priority now but is a long term needed feature. To define a scripting interface in Synfig Studio it is needed to understand how does Synfig works now and that’s a task that already has been started: viewtopic.php?f=22&t=1112&start=0&st=0&sk=t&sd=a (we need a similar task for synfig-core)
Please feel free to join to dive in Synfig code and help us on write down the internals of the Synfig code behavior. That would help to implement scripting properly as well as other features.
-G

Hi!
Thanks for the prompt reply, what I can say about the invite
to be involved in the code development is that I’m still very
much a noob programmer and my language is java. So I’m
not sure I’d have a positive contribution. However I’ll remain
watching this topic closely and digging into synfig.

Keep up the great software
Campbell

:blush: :blush: :blush:
I should have said:
“As a newbie programmer that tries to be an artist”

-G

Hi…
…to come back to your first request:

Is that what you are looking for?
Keyboard
Mouse

What is Lua?
Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Where does Lua come from?
Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil. Lua was born and raised in Tecgraf, the Computer Graphics Technology Group of PUC-Rio, and is now housed at Lablua. Both Tecgraf and Lablua are laboratories of the Department of Computer Science of PUC-Rio.

Why choose Lua?
Lua is a proven, robust language
Lua has been used in many industrial applications (e.g., Adobe’s Photoshop Lightroom), with an emphasis on embedded systems (e.g., the Ginga middleware for digital TV in Brazil) and games (e.g., World of Warcraft and Angry Birds). Lua is currently the leading scripting language in games. Lua has a solid reference manual and there are several books about it. Several versions of Lua have been released and used in real applications since its creation in 1993. Lua featured in HOPL III, the Third ACM SIGPLAN History of Programming Languages Conference, in June 2007.

Lua is fast , portable (builds out-of-the-box in all platforms that have a standard C compiler), embeddable (simple and well documented API that allows strong integration with code written in other languages, C/C++ and others) , powerful (but simple), small
Luca is free, MIT license.
lua.org/about.html

see(:ya!

Similar things can be said for Python. Anyway the selected language is not the issue, but the code of the interface on the Synfig side (lack of developers).
-G

Javascript, :mrgreen: I am learning it recently since my employer’s software use javascript a lot to as a “plug-in” system. And don’t forget there are many artists who use Adobe CS are able to use javascript as well. :mrgreen:

Javascript in my opinion is by far the best scripting language. I am in love with her flexibility. But it must be the hardest to implement.
LUA is the fastest I think. It is also been used by unreal tournament. It’s a good choice but not so popular.
Python must be the slower but the most popular.

I think the winner is Blender. Python. Stay close to the other popular.

Also why we need interface when the file format is so clear? The only reason I can think of is to create a gui similar to Blender or to Adobe’s Photoshop Lightroom. The book object in synfig’s source. Isn’t the way to breach this?

What we need is to find a way to tell python what is selected in the workarea the layer panel and so on.

What if you don’t have a file saved? Also, relying on the file on hard disc, means no undo. If you connect a script with the current actions in Synfig, the script effect can be undoable.
-G

Yes! This would extend the possibilities of scripting tremendously.
Almost all script ideas I come up with relies on info like this being passed from Synfig.

For now, i think Enve 2d is best example for this topic.

1 Like

Blender too.
It was proposed as a GSoC project last year :slight_smile: