Notifications
Clear all
[Closed] plugin simpleObject > mouse Point/Move clicks
Aug 27, 2007 7:15 pm
I’m having a problem with a ‘simpleObject plugin’ with MaxScript.
currently, if the user presses and releases the LMB (without dragging) in a viewport then the new object is created in the scene,
I wish this was not the case, the object should be removed if no dragging took place.
(for example like the ‘Standard Primlitives’ creation method has)
I have been trying to using a flag variable to check if the user has dragged or not between clicks,
but I couldn’t get it working either way.
I’m even not sure if the ‘click’ counter does count a press+release as 1 click, or as 2 clicks.
How would I create it in such a way that the object gets removed if no dragging took place?
tool create (
on mousePoint click do (
case click of (
1: coordsys grid (nodeTM.translation = gridPoint)
)
)
on mouseMove click do (
case click of (
2: fScale = abs(gridDist.y)
3: #stop
)
)
)