Closed GoogleCodeExporter closed 9 years ago
Note it is also possible to generate an image, not only a picture.
And it is possible to generate a brush even if the user did not capture one
before,
but you have to set the size by yourself from the lua script. The sample script
will
take the size of the current brush so yo uend up with a gradient on an 1x1
brush
which isn't so interesting. BTW, check the BrushFactory page on the wiki for
some
documentation :)
Original comment by pulkoma...@gmail.com
on 30 Oct 2009 at 9:41
Scripts that alter the color brush should call a function that switches to color
brush mode.
Original comment by yrizoud
on 30 Oct 2009 at 9:52
Yes. I'd have liked to do that automatically but can't find a solution for
that. So
the script will have to do it by itself.
Will add it in a moment.
Original comment by pulkoma...@gmail.com
on 30 Oct 2009 at 10:05
Binding added :)
Original comment by pulkoma...@gmail.com
on 30 Oct 2009 at 10:48
Original comment by pulkoma...@gmail.com
on 30 Oct 2009 at 11:38
I have a little doubt with the factory window.
Do you think we should keep it, or just make lua scripts loadable from the
load/save
window ?
Eventually i'd like to allow users to assign shortcuts (or even buttons) to
their
favourite lua scripts. The factory window could then be used for that.
About it's button : i've put it on the brush FX button as it was meant to
generate
or alter brush, but I ended up allowing the scripts to also change the picture,
so,
should I move this window to another button ?
Original comment by pulkoma...@gmail.com
on 31 Oct 2009 at 12:47
Listing scripts from a specific directory (with specific file extension, even)
seems
best. Can even read the first comment line(s) and display as script description.
About shortcuts: Free association would cause a big change in config format. A
smaller change would be having internally shortcuts for "script 1", "script 2"
etc,
and a separate configuration that lets the user put a script in a slot (stored
for
example as .ini variables : script1=test.lua). This sets a limit to the number
of
shortcuts, however.
I don't know how far you want to go with this... At the extreme,you can make
macros
which are simple sequences of actions, with a recorder, and record the
parameters to
these actions as well... But then every single editing action needs to be
available
in Lua, including some which require a lots of parameters (I'm thinking of all
we can
do in palette or shade screen, for example)
Button: I don't know if it needs a direct button on status bar... there's not
even
room for layers and animation menus.
Original comment by yrizoud
on 2 Nov 2009 at 2:48
File list : I'm now listing files from the $(data_dir)/scripts directory. No
extension filtering as there are .lua (normal script) and .lub (precompiled lua
bytecode).
Anyway, I don't have any particular plans for this, I added it on user request
to
generate pictures with a simple putpixel() function. The only really
interesting
extension I can see is towards scripted animation, but we don't even have
animations
yet :)
Original comment by pulkoma...@gmail.com
on 2 Nov 2009 at 5:43
Ok, this seems stable enough, so closing the issue.
Original comment by pulkoma...@gmail.com
on 17 Jan 2010 at 8:57
Original issue reported on code.google.com by
yrizoud
on 30 Oct 2009 at 9:33