Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5749

Mouse-over point OR the Object - why not both?

$
0
0

@RIL wrote:

I'm trying to write a script where mouse-over movements displays which current OSnap alternative would apply if clicking the object at that moment in time. The code:

 rc, pt_start = Rhino.Input.RhinoGet.GetPoint("Start point", False)

This displays what I want (the current OSnap), because seeing/knowing in advance which point to snap to is exactly what I want. But, it seems that, from the above command I can only get the point (pt_start) but not access to the underlaying object itself.

I could use the following get-method instead so as to get access to the object, but then I don't see the fancy mouse-over Osnap display, and thus not being able to determine if a click would hit the desired Osnap point (End or Mid, Cen etc):

obj_start = rs.GetObject("Start point", filter=(...), select=True)

Q: So how can I have both the Mouse-over/OSnap display and get access to the underlaying clicked object as well as determining which "OSnap point" on the object was selected?

// Rolf

Posts: 7

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5749

Trending Articles