Set toolmode or issue shortcut commands from george?

A forum dedicated to George scripting questions
Post Reply
User avatar
KenC
Posts: 174
Joined: 14 Aug 2009, 09:28
Location: Denmark

Set toolmode or issue shortcut commands from george?

Post by KenC »

Is there a function that sets the current drawmode of the selected brush? Like line, freehand draw, elipse, floodfill etc..

I'm trying to create a popup menu with tv_listrequest that allows me to pick tools and assign a shortcut to this script. Then I have a way to select tools without moving my pen to pick tools as the popup menu follows the mouse position.

Or perhaps a way to fire of tvpaint shortcut (Control+k) commands from george would be even better. That way I could create a dummy palette with the tools I want and create a popup menu to select from those.

Also, is there a way to insert a menu seperator into the popup from tv_listrequest? I tried using "-" but that doesn't work.
There's no place like ~/
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Set toolmode or issue shortcut commands from george?

Post by ZigOtto »

KenC wrote:Is there a function that sets the current drawmode of the selected brush? Like line, freehand draw, elipse, floodfill etc..
tv_setActiveShape
singledot|dot|flood|freehandline|freehandfill|linefill|line|splinefill|spline|rectfill|rect|ellipsefill|ellipse|selectrect|
selectellipse|selectfreehand|selectspline|selectflood|cutrect|cutpoly|cutfreehand|cutflood|crop|panning|position|
wrap|zoom
Last edited by ZigOtto on 30 Aug 2009, 10:16, edited 1 time in total.
User avatar
KenC
Posts: 174
Joined: 14 Aug 2009, 09:28
Location: Denmark

Re: Set toolmode or issue shortcut commands from george?

Post by KenC »

That's why I couldn't find it, it's not in the list of commands in my SDK docs.

Thanks.
There's no place like ~/
User avatar
ZigOtto
Posts: 4102
Joined: 17 Feb 2006, 22:50
Location: south-Petazonia

Re: Set toolmode or issue shortcut commands from george?

Post by ZigOtto »

probably the sdk doc needs a little refreshing update,
I think it will come with the (coming soon) v9.5 release.
stay tuned. :)
User avatar
KenC
Posts: 174
Joined: 14 Aug 2009, 09:28
Location: Denmark

Re: Set toolmode or issue shortcut commands from george?

Post by KenC »

Great. Thanks for the updated list.
There's no place like ~/
Svengali
Posts: 1553
Joined: 28 Dec 2006, 10:08

Re: Set toolmode or issue shortcut commands from george?

Post by Svengali »

Hi Ken,

Here's a little script (for TVP 9) that displays info on the current tool and parameter settings... very useful for viewing all the parameters (and their order, which is important when writing script commands to set specific parameters...) Assign it to a button and you can review the current tool at any time.

When 9.5 comes out I'll release an updated ActiveToolInfo.grg. The 9.5 tv_GetActiveShape command parses the extended info a little differently.

Sven
Attachments
ActiveToolInfo.grg
(2.76 KiB) Downloaded 138 times
User avatar
KenC
Posts: 174
Joined: 14 Aug 2009, 09:28
Location: Denmark

Re: Set toolmode or issue shortcut commands from george?

Post by KenC »

Thanks Sven, that will come in real handy.

btw a switch/select case statement would be a super addition to george imo :D
There's no place like ~/
Post Reply