Notifications
Clear all
[Closed] detect when a node is selected with move or rotate tool
Apr 17, 2015 12:34 am
I would like to assign a CA to an object that does things when certain events occur to the object:
selection and the transform tool changes (form Move to Rotate for example)
I started looking at the when command but I am not used to it, and wonder if there is a better way
so far I have this:
delete objects
b=box()
when select b changes handleAt: #redrawViews do (
if b.isSelected then(
format "%
" (b.name+" is selected with the "+(toolmode.commandmode)+" tool")
)
)
but it won’t notify me if the tool changes form Move to Rotate or vice versa
3 Replies
Apr 17, 2015 12:34 am
it’s better to use general callbacks: #selectionSetChanged and #spacemodeChange (which is magically fired on tool mode changed as i remember)
1 Reply
Apr 17, 2015 12:34 am
see this thread and my comments. http://forums.cgsociety.org/showthread.php?f=98&t=1271074
‘when handle’ dies with its target…