Custom Tools mouse up,drag,down frustration

Community Beginner ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

Hi fellow developers,

 

I'm trying to write a tool plugin but i'm getting really frustrated with how Ai handles this.

Let me try to explain the situation:

First I tought: nice! mouse down, mouse drag, mouse up. I know this, lets work with it. It turns out that when using the default mouse draggin method...it stays in the drag loop basicly ignoring Timer calls, effect/style updates etc. untill you finaly mouse up and everything updates again. When draggin art for example i would like to see realtime updates, visualy, of path, style and effects... not only the path anotationlines.

 

Then I found the flag kToolDoesntWantArtStyleExecutionSuspender. Yes! ... this is what i'm looking for... but this does nada! It is still stuck in the drag routine no updates of styles or effects when manipulatin and draggin paths/anchors in the drag method only until i 'mouse up'. So not an inch closer to what i'm looking for.

 

Then I see the flag kToolHasItsOwnDragLoop. Hell yeah! my own drag loop... but here it starts to get really bizar. This flag disables the standart dragloop... ok thats normal. But it turns out that tracking is also not working basicly letting me think... where the hell does the custom drag loop will take place? On top of that when I 'mouse down' with my tool and this flag is on... the 'mouse up' is triggered automaticaly and almost emediatly after my 'mouse down'  while I'm still having my mouse button pressed down. This logicaly defeats the purpose of a custom drag loop since the 'mouse up' is triggered automatically and not when I physicly mouse up.

 

So my questions:

Does anybody know how to get update on style and effects whyle dragging and manipulating path/art with a custom plugin tool? 

 

Attached recording demos this problem. With the 'black arrow Ai tool'  the style follows, with my custom tool it doesn't. This is with the standart mouse down drag and up methods.

 

I could windows mousehook and all this kind of hacking/workarounds but really I would like a sollution within the SDK boundries. I could very well be that I'm missing something important here...

 

Any practical hints from experience would be great.

 

Kind regard,

 

Minne

TOPICS
SDK , Third party plugins

Views

35

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Aug 25, 2022 Aug 25, 2022

To those who are wondering, i found the solution... yet another suite!

It turns out there is a 'Live Edit Suite' wich allows to register a tool plugin for live editing. 

You either register it in the plugin startup method... or you can orcastrate precise when to start and stop.

What a good night sleep can do.... 🙂

Likes

Translate

Translate
Community Beginner ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

LATEST

To those who are wondering, i found the solution... yet another suite!

It turns out there is a 'Live Edit Suite' wich allows to register a tool plugin for live editing. 

You either register it in the plugin startup method... or you can orcastrate precise when to start and stop.

What a good night sleep can do.... 🙂

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines