Displaying origin as you drag objects

Jan 18, 2007 at 7:04pm

Displaying origin as you drag objects

Is there a way to display the origin of an object when you select and drag
it?

In this line it would be 6 & 316

#P message 6 316 333 196617 myMessage 1 2 3;

Mousestate doesn’t do the job because it displays where the mouse is in
terms of the screen not the window.

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#29788
Jan 18, 2007 at 7:14pm

maybe u could do it by using thispatcher to report the window position in the desktop, then use that to offset the coordinates from Mousestate?

or better, i just checked mousestate.help, and there are modes for getting whole screen / local patcher coordinates…

#93680
Jan 18, 2007 at 7:17pm

mode 1 is what u need (relative to patcher).
moustate defaults to mode 0, which is relative to the screen

#93681
Jan 20, 2007 at 12:08am

The mousestate mode message is *sort of* what you want… however… it will give you the coordinates of the cursor, not the upper-left-corner of your object. So you’d need to know the offset of where you clicked originally from the top-left…

Using scripting / mousestate to move your objects (instead of typical dragging in edit mode) would allow you to keep a coll of all the top-left-corner coordinates of your objects (as they would be defined by the last place you dragged them). Use transparent buttons on top of whatever objects you want to drag, then script-move them both upon click/drag. It will take some fiddling but I’ve gotten it to work. Also check out the “pupdate” message to Max for manual pointer placing.

Working on that message / timeline idea? ;-)

Like to see what you come up with, it’s an interesting venture and would provide some great features for Max.

–C

#93682

You must be logged in to reply to this topic.