MaxPlus - Append Multiple Targets to a Path Constraint

I’m trying to add multiple targets to a Path Constraint but it seems that the unique way to add a target to a Path Constraint using MaxPlus is using ParameterBlock.Path, so you only can set one target.
Anyone knows if using MaxPlus there is another way to set targets into a Path Constraint (MaxScript, for example, has a appendTarget method available)

Thank you!

I’ve been trying to figure out how to add a single target to a Position_Constraint object. I also can’t find any way to append targets via MaxPlus. I’m super interested in what you’re doing through the ParameterBlock though. Care to share?

Here is what I have so far:


import MaxPlus
import pymxs

rt = pymxs.runtime

tgtObj = MaxPlus.Factory.CreateHelperObject(MaxPlus.ClassIds.Point)
tgtNode = MaxPlus.Factory.CreateNode(tgtObj, 'tgt')
w
srcObj = MaxPlus.Factory.CreateHelperObject(MaxPlus.ClassIds.Point)
srcNode = MaxPlus.Factory.CreateNode(srcObj, 'src')
srcNode.Position = MaxPlus.Point3(0, 0, 30)

cns = MaxPlus.Factory.CreatePositionController(MaxPlus.ClassIds.Position_Constraint)

transform = tgtNode.GetSubAnim(2)
tgtNode.AssignController(cns, 2)


tgtNode.Select()
MaxPlus.Core.EvalMAXScript('tgtNode = $')
tgtNode.Deselect()

srcNode.Select()
MaxPlus.Core.EvalMAXScript('srcNode = $')
srcNode.Deselect()

MaxPlus.Core.EvalMAXScript('tgtNode.transform.controller.appendTarget srcNode 50')