Notifications
Clear all

[Closed] Python equivalent for WM3_MC_BuimdFromNode?

I would like a INode to have multiple morphers since a morpher has only 100 channels. Therefore in python I initialise as many morphers as needed for the amount of channels I have. Afterwards I’m trying to add targets to specified channels for specific morphers.

   The following code explains the essential problem, target and node are INodes which are collected earlier:

       import MaxPlus test = MaxPlus.FPValue()
      #The target node has only one morpher and I want to retrieve it using #.morpher[1]
       bool = MaxPlus.Core.EvalMAXScript("WM3_MC_BuildFromNode $node.morpher[1] 1 $target", test) 
     print bool  
      
 This snippet of code doesn't work, the boolean returns false. The following code does work but I need multiple morphers.

    import MaxPlus test = MaxPlus.FPValue() 
    #The target node has only one morpher
     bool = MaxPlus.Core.EvalMAXScript("WM3_MC_BuildFromNode $node.morpher 1 $target", test) 
    print bool
    
   Note: don't mind the identation, in python it is correct but can't seem to get it right with the "
 " tags.
       What am I doing wrong? I do not know much about  MaxScript and the API isn't very specific. Would  MaxPlus.Animatable.AssignController work instead? I'm not sure.
        
       Thank you in advance.