Home Technical Talk

maxscript node event system returned node

polycounter lvl 15
Offline / Send Message
leslievdb polycounter lvl 15

maxscript question, i`m working with the node event system and in the function you call you have an event and a node param
i`m trying to get the actual selected node so i can check if its a spline but the param is a number instead of a node

Event Detected: Event#geometryChanged, Nodes #(8998)

at first i thought it was a nodehandle but the number does not correspond with that nodehandle

http://help.autodesk.com/view/3DSMAX/2016/ENU//index.html?guid=__files_GUID_7C91D285_5683_4606_9F7C_B8D3A7CA508B_htm

does anyone know how to get the actual node that was changed instead of the number?



Replies

  • monster
    Options
    Offline / Send Message
    monster polycounter
    Can you post a code sample? Because it's supposed to work the way you explained.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    This works for me and prints the name out of the object correctly.

    --//UNREGISTER THE CALLBACK
    callbackItem = undefined
    gc light:true
    
    --//FUNCTION TO PRINT THE OBJECT NAME
    fn CallbackFn1 ev nd =
    (
    	for n in nd do
    	(
    		obj = (GetAnimByHandle n)
    		format "Object: %\n" obj.name
    	)
    )
    
    --//REGISTER THE CALLBACK
    callbackItem = NodeEventCallback mouseUp:true delay:0 geometryChanged:CallbackFn1
Sign In or Register to comment.