Grids and Sine wave drawing tools
Moderators: Víctor Paredes, Belgarath, slowtiger
- hayasidist
- Posts: 3531
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Grids and Sine wave drawing tools
Ok people ... be gentle with me - this is my first serious attempt at scripting for AS. For sure there are many other ways to do what this toolset does, so if no-one wants it --- well, as Thumper would say "if you can't say something nice don't say nothing at all..."
The file is at http://www.mediafire.com/?x5wsnah3wg3tc5e. It's a zip with a Readme, the LUA and the icons. It has been tested only on ASP7.
This set of tools is based on the SHAPE tools that come with Anime Studio.
The three key things are: Multipoint straight line; Grid; Sine wave (the other three were more of a practice run than anything else).
constructive criticism / ideas for improvement and enhancement etc always welcome.
The file is at http://www.mediafire.com/?x5wsnah3wg3tc5e. It's a zip with a Readme, the LUA and the icons. It has been tested only on ASP7.
This set of tools is based on the SHAPE tools that come with Anime Studio.
The three key things are: Multipoint straight line; Grid; Sine wave (the other three were more of a practice run than anything else).
constructive criticism / ideas for improvement and enhancement etc always welcome.
-
- Posts: 370
- Joined: Thu Aug 05, 2004 2:23 am
- Location: Los Angeles
- Contact:
- Víctor Paredes
- Site Admin
- Posts: 5664
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
It's always fantastic to have a new scripter in the club
Thanks for sharing your first one, Hayasidist. I tested it on version 8 and works perfectly.
Thanks for sharing your first one, Hayasidist. I tested it on version 8 and works perfectly.
Moho Product Manager
www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
- funksmaname
- Posts: 3174
- Joined: Tue May 29, 2007 11:31 am
- Location: New Zealand
Thanks, hayasidist,
Interesting....nice shapes. They could be useful. They remind me of some
Adobe Illustrator plugins I've seen.
I wish I had some skill at scripting. I feel it would be a little too much for me to start. I joked with my step son that he should learn to write scripts for ASP, but when he said he could try, I felt I might be exploiting him.
....Any way keep up the good work.
udd
Interesting....nice shapes. They could be useful. They remind me of some
Adobe Illustrator plugins I've seen.
I wish I had some skill at scripting. I feel it would be a little too much for me to start. I joked with my step son that he should learn to write scripts for ASP, but when he said he could try, I felt I might be exploiting him.
....Any way keep up the good work.
udd
- hayasidist
- Posts: 3531
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Hi All,
thanks for your encouraging and positive replies.
WIP on this set is going in this direction:
number of points is configurable (menu bar entry option)
- "round edged" square is being ditched and replaced by circle segment (quadrant / semi circ or anything less than a full 360 circle) (if you want a round edged square then use the drawing tool then curvature .. )
- 4-point oval is being replaced by multipoint ellipse
- grid -- number of rows / columns configurable
- line -- number of points config
- star -- number of "spikes" config
- sine -- number of points in the curve config
My main current (soon to be resolved?!? ) problem is with point curvature on the ellipse (odd things happen where x or y dimension gets very small wrt the other) - so if you're not straining at the leash for the update, please hang on for a few days when I hope to get the issues fixed and the files into a release pack.
==
looking to the subsequent updates:
A question for the scripters ...
there's the set of functions mouseEvent. alt/shift/ctrl Key. is there a similar function to capture such as Arrow-up / arrow down key strokes at the same time as mouse is dragging. And/or mouse right click / thumbwheel??? I've been browsing the documentation that I've found in this part of the forum, but no luck finding anything useful so far...
thanks for your encouraging and positive replies.
WIP on this set is going in this direction:
number of points is configurable (menu bar entry option)
- "round edged" square is being ditched and replaced by circle segment (quadrant / semi circ or anything less than a full 360 circle) (if you want a round edged square then use the drawing tool then curvature .. )
- 4-point oval is being replaced by multipoint ellipse
- grid -- number of rows / columns configurable
- line -- number of points config
- star -- number of "spikes" config
- sine -- number of points in the curve config
My main current (soon to be resolved?!? ) problem is with point curvature on the ellipse (odd things happen where x or y dimension gets very small wrt the other) - so if you're not straining at the leash for the update, please hang on for a few days when I hope to get the issues fixed and the files into a release pack.
==
looking to the subsequent updates:
A question for the scripters ...
there's the set of functions mouseEvent. alt/shift/ctrl Key. is there a similar function to capture such as Arrow-up / arrow down key strokes at the same time as mouse is dragging. And/or mouse right click / thumbwheel??? I've been browsing the documentation that I've found in this part of the forum, but no luck finding anything useful so far...
-
- Posts: 370
- Joined: Thu Aug 05, 2004 2:23 am
- Location: Los Angeles
- Contact:
Right mouse and scroll wheel, no. They're always used by AS. But keys you can. The K key would be used like this:hayasidist wrote: A question for the scripters ...
there's the set of functions mouseEvent. alt/shift/ctrl Key. is there a similar function to capture such as Arrow-up / arrow down key strokes at the same time as mouse is dragging. And/or mouse right click / thumbwheel??? I've been browsing the documentation that I've found in this part of the forum, but no luck finding anything useful so far...
Code: Select all
if (keyEvent.key == 'k') then
Code: Select all
if (keyEvent.keyCode == LM.GUI.KEY_UP) then
KEY_RETURN - The Return or Enter key
KEY_ESCAPE - The Escape key
KEY_TAB - The Tab key
KEY_BACKSPACE - The Backspace key
KEY_DELETE - The Delete key
KEY_HOME - The Home key
KEY_END - The End key
KEY_PAGEUP - The Page Up key
KEY_PAGEDOWN - The Page Down key
KEY_LEFT - The left arrow key
KEY_UP - The up arrow key
KEY_RIGHT - The right arrow key
KEY_DOWN - The down arrow key
KEY_F1 - The F1 key
KEY_F2 - The F2 key
KEY_F3 - The F3 key
KEY_F4 - The F4 key
KEY_F5 - The F5 key
KEY_F6 - The F6 key
KEY_F7 - The F7 key
KEY_F8 - The F8 key
KEY_F9 - The F9 key
KEY_F10 - The F10 key
KEY_F11 - The F11 key
KEY_F12 - The F12 key
There's more info in the scripting reference under Moho, KeyEvent
- hayasidist
- Posts: 3531
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Thanks a lot - I hadn't found that ref... so much info - a blessing and a problem at the same time. I'll give it a go.
But in the meantime, another question comes to mind - If I'm trapping these keystrokes, does this mean that if (say) I trap an "S" key that this will override the S as Scale Points ... for just as long as I have the "trap" active?
But in the meantime, another question comes to mind - If I'm trapping these keystrokes, does this mean that if (say) I trap an "S" key that this will override the S as Scale Points ... for just as long as I have the "trap" active?
- hayasidist
- Posts: 3531
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Tools updated.
=========
the new version is at http://www.mediafire.com/?v9hqb20h3vobumd
The zip file has Readme, the LUA and the icons. It has been tested only on ASP7.
Main changes: number of points is selectable; circle segment replaces rectangle; generic ellipse replaces predefined oval (but you can still make the "eye" shape by creating a four-point shape); grid size selectable; grid fill now supported; UI flaws fixed in oval and sine.
as ever, comments / suggestions welcome.
=========
the new version is at http://www.mediafire.com/?v9hqb20h3vobumd
The zip file has Readme, the LUA and the icons. It has been tested only on ASP7.
Main changes: number of points is selectable; circle segment replaces rectangle; generic ellipse replaces predefined oval (but you can still make the "eye" shape by creating a four-point shape); grid size selectable; grid fill now supported; UI flaws fixed in oval and sine.
as ever, comments / suggestions welcome.
- hayasidist
- Posts: 3531
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Hi Again,
tweaked this around a bit more. the new version is at the old URL http://www.mediafire.com/?v9hqb20h3vobumd.
Key new things are better and more options; draw polygon added, "glitches" in sine and grid fixed.
The zip file has Readme, the LUA and the icons. It has been tested only on ASP7.
as ever, helpful comments and suggestions welcome.
tweaked this around a bit more. the new version is at the old URL http://www.mediafire.com/?v9hqb20h3vobumd.
Key new things are better and more options; draw polygon added, "glitches" in sine and grid fixed.
The zip file has Readme, the LUA and the icons. It has been tested only on ASP7.
as ever, helpful comments and suggestions welcome.