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

    1. --//UNREGISTER THE CALLBACK
    2. callbackItem = undefined
    3. gc light:true
    4.  
    5. --//FUNCTION TO PRINT THE OBJECT NAME
    6. fn CallbackFn1 ev nd =
    7. (
    8. for n in nd do
    9. (
    10. obj = (GetAnimByHandle n)
    11. format "Object: %\n" obj.name
    12. )
    13. )
    14.  
    15. --//REGISTER THE CALLBACK
    16. callbackItem = NodeEventCallback mouseUp:true delay:0 geometryChanged:CallbackFn1
Sign In or Register to comment.