Callback when subobject is moved/rotated/scaled

Callback when subobject is moved/rotated/scaled

Anonymous
Not applicable
884 Views
2 Replies
Message 1 of 3

Callback when subobject is moved/rotated/scaled

Anonymous
Not applicable

Hello

 

I can't find in the documentation any way to register a callback related to a subobject being moved/rotated/scaled. In the class INodeEventCallback, there is a SubObjectSelectionChanged and a ControllerOtherEvents. The latter is related to the transform operations but at node level. I would like to listen to move/rotate/scale in one specific sub-object level in order to perform some other actions related to the selection.

 

Thanks in advance

0 Likes
Accepted solutions (1)
885 Views
2 Replies
Replies (2)
Message 2 of 3

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

try this snippet:

try
(
	newNodeEventCallback = undefined
	gc light:true
)
catch()
global newNodeEventCallback
global functions
struct FunctionStruct
(
	fn eventTestFn event handles =
	(
		format "event:%\n" event
	)
)
functions = FunctionStruct()
newNodeEventCallback = NodeEventCallback all:functions.eventTestFn
newNodeEventCallback.enabled = on

just evaluate it ... and you will see all Node Event Callbacks

 

#geometryChanged is specifically what you are looking for

 

Another way is to use 

when geometry ... change
when topology ... change

we can talk about this option if Node Event Callbacks will not work for you for any reason

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks, very much appreciated your help.

0 Likes