HS_Shape V10

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
hayasidist
Posts: 3528
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

HS_Shape V10

Post by hayasidist »

It's here: https://mohoscripts.com/script/hs_shape (I hope I've managed to navigate that site's upload process correctly!!)
and also here: https://www.mediafire.com/file/d2ecsb72 ... 0.zip/file

The .zip has an install folder and a readme.



What’s new in this version (since version 9.67)?
================================================

Totally re-architected. This version is the foundation for the next revision which is intended to allow user-written sub-tools to be accommodated.
Added the “additional functions” for help and re-set subtools (see below).
Enabled the “ratio / scale” (floating point input) so that it can be changed (and thus change the drawn shape) immediately after the shape is drawn.
A keystroke handler is introduced. Ctrl-key directs the keystroke to the factory SelectPoints keystroke handler (this only services “delete selected points” at present); key (or alt-key or shift-key) is handled within this tool – again only “delete selected points” is currently supported. This difference is that the factory tool will delete all selected points; this tool will only delete points from the last shape created by this tool if it is “editable”.


The main set of drawing tools is essentially unchanged from V967 (Moho 13.5.3) from 07 April 2022.
There is a new (version 1.04) sub-tool to draw card suit shapes. This is provided as a separate file in the Utility folder.

==
The “additional functions” button (to the left of the sub-tool buttons) changes the behaviour of the sub-tool selection buttons.
Clicking (or alt-clicking) the button cycles forwards (or backwards) through the options:
>>> O – normal operation of the sub-tool
>>> R – reset the sub-tool’s options (and leave the sub-tool active)
>>> ? – print the sub-tool “help/about” message (and leave the sub-tool active)

==

Editing a shape
================
Having drawn a shape using a sub-tool it is possible to change the detail of the shape by, optionally, changing a numeric input field (other than those that directly or indirectly define the number of points in the shape) and then holding down the control key and simultaneously clicking and dragging the mouse. Once the edit operation is in progress the control key may be released if its shape modifying action is not required. Note that the shift and alt keys remain set as they were when the shape was created.
Also, where the sub-tool uses the floating point input to control scale / ratio / roundness (etc) this value can be modified immediately after the shape has been drawn to change the drawn shape.
If a shape is created on frame 0 (e.g. with the “create on frame 0” checkbox checked) then modified on a different frame (with the “create on frame 0” checkbox unchecked) the shape will be animated.

This video expressly shows the round-cornered rectangle, and how it can be edited and animated. The same is available for any of the subtools that use the "floating point" input field (all the card suits, swiss cross, parabola, multi-line, sine, star, annulus, (vector) bone shape)



===


Problems / issues / requests -- please say!
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: HS_Shape V10

Post by synthsin75 »

Great new features, Paul!

Personally, I always download from mohoscripts as simple ZIP.
In that case, it helps if any utility files are named to indicate that's where they go.
So I just grabbed your mediafire one instead.
User avatar
hayasidist
Posts: 3528
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: HS_Shape V10

Post by hayasidist »

Version 10.01 is now available. It is a minor bug fix ... a Lua console message is generated when creating a path that does not result in a Moho shape being created (the path is correctly created -- the error message is an annoyance only).

Links are as in the original post.

Any problems or issues, please let me know.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: HS_Shape V10

Post by Greenlaw »

Cool! Thanks Paul...will download and install today and let you know how it goes.
Post Reply