Please send suggestions for my scriptwriting
Moderators: Víctor Paredes, Belgarath, slowtiger
The Translate Points tool works as you described. But you must click exactly on the point, together with the SHIFT key. If you click on the line, outside of the points, all points are selected. The LM's original point selection requires too precise clicking, so maybe I will replace it with a "click near to point" version.
- - - Fazek
I now see my mistake - After selecting the multiple points I was then clicking on one of the points to drag them all. This deselected the others. I should just drag without touching any points with the Translate tool cursor.
And I just noticed that one can drag the Translate cursor tool and select multiple points. Wow!
Impossible with the Moho version of the tool and essentially elilminating the need of Moho´s Select Points tool.
Now being able to select multiple points with the Translate Tool is like taking the Moho Translate tool out of the Stone Age and putting it into modern vector illustration program standards.
Thanks!!!
(Now if a better method could be devised for adjusting curves on lines.....
)
And I just noticed that one can drag the Translate cursor tool and select multiple points. Wow!
Impossible with the Moho version of the tool and essentially elilminating the need of Moho´s Select Points tool.
Now being able to select multiple points with the Translate Tool is like taking the Moho Translate tool out of the Stone Age and putting it into modern vector illustration program standards.
Thanks!!!

(Now if a better method could be devised for adjusting curves on lines.....

Visual Stlyle Palette
I'll throw in my 2 cents for a feature I would love to see in Moho, possibly made by independent programmers:
A visual palette for styles . . . in other words, a way to display, in rendered form, what a style actually "looks like". Then, there should be an extremely simple way to select a shape, click on the visual, actual representation of that style, and have the shape update immediately . . . a 2 click solution. Artists like simplicity where programmers like complexity.
Most of us use a very finite number of styles on any given project, so the palette could be saved with every project, for repeated use. Such a palette could also be saved as a kind of default palette, by means of a project "template".
My main complaint with Moho is too many tools and too many clicks to get things done. Simplify, simplify, simplify.
Thanks,
Greg Smith
A visual palette for styles . . . in other words, a way to display, in rendered form, what a style actually "looks like". Then, there should be an extremely simple way to select a shape, click on the visual, actual representation of that style, and have the shape update immediately . . . a 2 click solution. Artists like simplicity where programmers like complexity.
Most of us use a very finite number of styles on any given project, so the palette could be saved with every project, for repeated use. Such a palette could also be saved as a kind of default palette, by means of a project "template".
My main complaint with Moho is too many tools and too many clicks to get things done. Simplify, simplify, simplify.
Thanks,
Greg Smith
...EY! (HI!Fazek wrote:Maybe a menu script would be useful to duplicate and rename a layer this way.



PD1: BTW... I'm enjoining too with all your modified scripts, so... THANKS again!
PD2: I'm elavorating too something like an "issues list" that I will comment to you in other moment

I thought only to make a menu script to duplicate a layer with a different naming convention. It has no relations to the layer scripts at all. The LM's default duplication takes the layer name, increases its number if it has, or adds " 2" to the end of the name. It is not so sophisticated (for my script, we must distinguish the orignal and the copy somehow) and usually creates many-many similar names everywhere in the layer tree. It is confusing.
PS. I think the best way to keep the variables of the layerscript is to put them into the LAYER structure. The layer is a simple lua table and you can keep any custom variables there. (but Moho won't save your own variables). It seems the variables are there even if you are using or not the "LayerAs..." typecasts.
PS. I think the best way to keep the variables of the layerscript is to put them into the LAYER structure. The layer is a simple lua table and you can keep any custom variables there. (but Moho won't save your own variables). It seems the variables are there even if you are using or not the "LayerAs..." typecasts.
- - - Fazek
First, if I did not yet say thank you for your scripts Fazek - thank you. The many cool scripts added by scripters like yourself have really increased the power -and ease of use- of Moho.
I have many suggestions but I'll just offer one related to all these scripts. Not sure LUA can handle this but it would be useful to be able to create different tool sets - ie assign all these scripts to various toolbars- and be able to load different ones with hotkeys. Say I assign your scripts or mactons to their own toolbars, assign each one to a function key and I can popup your scripts when I need them and mactons when I need those. I am a little confused by so many scripts -and of course I want them all.
I have many suggestions but I'll just offer one related to all these scripts. Not sure LUA can handle this but it would be useful to be able to create different tool sets - ie assign all these scripts to various toolbars- and be able to load different ones with hotkeys. Say I assign your scripts or mactons to their own toolbars, assign each one to a function key and I can popup your scripts when I need them and mactons when I need those. I am a little confused by so many scripts -and of course I want them all.

[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
It is possible to create additional dialog windows and keep them open while you are using any other functions of Moho. It is also possible to load and run external lua scripts from a lua script. The problem is, if I create such a window, it has no access to the actual edited scene (the "moho" variable). Maybe it is possible to make a workaround and emulate the functions of the default tool system. Maybe it is possible to make a better, incompatible syntax. But many features works hidden from LUA - replacing the contents of the toolbar, for instance. And there is no icon button widget, not possible to load and show a .png image, so the window's user interface would be very poor. So I think this solution has very low quality, if possible. Perhaps LM reads this and will add this solution to the next version, since he can do it more easily, in the core program.
- - - Fazek
I have an idea about a still vector image format, matching to Moho's internal data hierarchy (points, curves, shapes), easily loadable from lua and easily editable by hand and by other programs. In the current version of Moho, I can't put the image vectorising directly inside, so I want to write a separated external program in C, and passing the result back in a file. The os.execute() seems working on every platforms. Later this would become a shared library, loadable from lua.
For the image vectorising, I really need the meaning of the curvature value. Now I think the curves in Moho are simplified Bezier curves. The direction of the two control points around a point P1 is the same as the vector between P0 and P2 (the neighbour points) and the length of the control points vector is the curvature - see the image. At the end points, it uses the vector between the end point and the only one neighbour.
This is only my suspect so please tell me if somebody knows (mathematically?)

For the image vectorising, I really need the meaning of the curvature value. Now I think the curves in Moho are simplified Bezier curves. The direction of the two control points around a point P1 is the same as the vector between P0 and P2 (the neighbour points) and the length of the control points vector is the curvature - see the image. At the end points, it uses the vector between the end point and the only one neighbour.
This is only my suspect so please tell me if somebody knows (mathematically?)

- - - Fazek
Regarding your question I haven´t the slightest clue, but maybe these links can help you:
http://www.cse.unsw.edu.au/~lambert/splines/
http://www.ibiblio.org/e-notes/Splines/Intro.htm
http://en.wikipedia.org/wiki/Spline_(mathematics)
http://mathworld.wolfram.com/Spline.html
---------
Your vector drawing technique you describe would be very interesting!
http://www.cse.unsw.edu.au/~lambert/splines/
http://www.ibiblio.org/e-notes/Splines/Intro.htm
http://en.wikipedia.org/wiki/Spline_(mathematics)
http://mathworld.wolfram.com/Spline.html
---------
Your vector drawing technique you describe would be very interesting!
Thank you. This is not my technique, it's Lost Marble's. Now I have an answer from LM so it is sure that the control points are working as I wrote above. The only thing I don't know yet is how the Curvature parameter affects the length of the vector. It seems it is working locally, so the two control point vectors have independent sizes (but same direction) and a size is depending only on the distance of the connected neighbour point and the curvature. I am waiting an answer from Lost Marble about this, but maybe now I can recover this secret alone as well.
There is a problem with loading Illustrator and EPS files into Moho. Because these formats are using (cubic) Bezier curves, Moho must convert the curves into its internal format. It keeps the original points, and adds extra points to approximate the original curve. I think this algorythm cannot do this correctly. I am thinking on a different one which converts the original curve into a sequence of many small linear segments, then optimizing them into a correct curve. This would be useful for
- loading and converting these files,
- pixel image vectorising,
- the freehand drawing tool
There is a problem with loading Illustrator and EPS files into Moho. Because these formats are using (cubic) Bezier curves, Moho must convert the curves into its internal format. It keeps the original points, and adds extra points to approximate the original curve. I think this algorythm cannot do this correctly. I am thinking on a different one which converts the original curve into a sequence of many small linear segments, then optimizing them into a correct curve. This would be useful for
- loading and converting these files,
- pixel image vectorising,
- the freehand drawing tool
- - - Fazek
Magnet tool added, inspired by a question from Postality in the feature request forum. It has a support to modify the points with two "magnets", around a mirroring center or an axis. You can set the position of the center or the axis with selected points. It is useful if you want to keep the symmetry of a shape. It is not a final version and I am waiting the ideas how to make it more comfortable.
I still need some information about the curvature.
I still need some information about the curvature.
- - - Fazek
Modified Magnet tool: if you click on an existing curve, you can add new points symmetrically. If you set the mirror center or axis from selected points, it will follow these points if moving in the timeline (use the space to disconnect the mirror handles).
Now this new tool is not a Magnet at all.
Now this new tool is not a Magnet at all.
- - - Fazek
A menu item (in menu/Script Writing) added. It is a useful tool to examine undocumented Lua variables (if any). It prints variable listing into the Lua console, very similar to the way as LM's scriptwriting menu items do. It can dump the global table (use the _G name) or the contents of MOHO, LM or LM.GUI - or any others. It has an option to print the contents of tables recursively.
ADDED: It can print the contents of metatables (some information handled as "userdata" in Moho - for example, the famous "moho" variable. These variable types are containing their functions and variables in metatables. You can find some metatables at other variables as well.) I made some access points to the most interesting variables inside the global "FA_PrintValue" table, under the name MOHO, MOHODOC etc.
It has a history as well, so you can switch between the already processed variables, back and forwards.
A smart thing: you can evaluate any expressions, even you can call functions in this program. For example, you can read the actually selected layer if you enter FA_PrintValue.MOHO.layer by hand. Or just use it to calculate the 2 * 2 value.
ADDED: It can print the contents of metatables (some information handled as "userdata" in Moho - for example, the famous "moho" variable. These variable types are containing their functions and variables in metatables. You can find some metatables at other variables as well.) I made some access points to the most interesting variables inside the global "FA_PrintValue" table, under the name MOHO, MOHODOC etc.
It has a history as well, so you can switch between the already processed variables, back and forwards.
A smart thing: you can evaluate any expressions, even you can call functions in this program. For example, you can read the actually selected layer if you enter FA_PrintValue.MOHO.layer by hand. Or just use it to calculate the 2 * 2 value.
- - - Fazek