[MaxPlus] (2017) Adding Animation Constraint Targets

Hi!
I’ve been using Python with Maya in the last year and this week I’ve been getting into Python with Max.

Right now I’m able to add a position constraint to an object but I’m having a hard time figuring out how to “Add Position Target” to it.

import MaxPlus

boneObj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.BoneGeometry)
boneObj.ParameterBlock.Height.Value = 10.0
boneObj.ParameterBlock.Width.Value = 10.0
boneNode = MaxPlus.Factory.CreateNode(boneObj)
boneNode.WireColor = MaxPlus.Color(0.67843, 0.72941, 0.79607)
boneNode.Position = MaxPlus.Point3(20, 10, 5)

objCylinder = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Cylinder)
nodeCylinder = MaxPlus.Factory.CreateNode(objCylinder)

positionConstraint = MaxPlus.Factory.CreatePositionController(MaxPlus.ClassIds.Position_Constraint)
positionConstraint.SetTarget(boneNode)
nodeCylinder.AssignController(positionConstraint, 2)

That successfully makes a Position Constraint but there’s no position target in it’s list.

I saw this thread on Path Constraints:

It seems like he was able to make a Path Constraint target using a ParameterBlock.
I’m not sure how though.
I tried looking at the parameters available in a Position_Constraint:

for p in nodeCylinder.ParameterBlock.Parameters:
	print p.Name, p.Value

which gives me this:

and I see nothing helpful in the INode ParameterBlock.

What am I missing?
Any help would be appreciated.

Also is there any better documentation than this for MaxPlus?
http://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__py_ref_class_max_plus_1_1_i_node_html
It doesn’t seem all that helpful…
If you know of any useful resources for someone just jumping into Python with Max, I’d love to know about them!

Thanks,
Jesse

eh is pymxs the thing to be using these days? MaxPlus outdated?

Well, not exactly outdated, pymxs calls the MAXScript engine so you have all the MAXScript functionality and any variables and functions currently in the global scope at your disposal, while MaxPlus is a rather limited wrapper of a subset of the SDK. In my experience, python was the slowest language you could choose in 3ds max (outside just maths, if most of the time spent is on calculations, MAXScript will be worse) so I’d consider implementing the needed functionality in MAXScript/.NET (or even MCG) and just call it via pymxs.

Thanks man, I’ll look into those choices before I go further
Just got anxious and wanted to jump in while I had time between projects

Hi everyone, if you are 3dsMax artists / TD , I would like to invite you to our channel http://www.youtube.com/cebasVT.
As well to Cebas Visual Technology Inc. | Victoria BC . Primarily, our news focus will be the upcoming powerful trueHybrid finalRender R4 in September - it’s a major development for Max users.

And we are also very focus on Max pipeline with thinkingParticles (as used in the blockbusters as well as game cinematics, and TV series) . Our community also chat a lot about Maxscript. So please feel welcome : here’s a list that you can filter thru and see which one helps you best in being a part of … Welcome!

Building your Social Capital with Cebas
You are also invited to signup for a free account at cebas.com to access information.

Please also consider joining the technical sharing forum started by Goran Pavles and Eloi Andaluz Welcome effectivetds.com - Justhost.com
The forums are for serious learners. And Matt Radford’s Categories - Real Time VFX (Games vfx). Matt is from Naughty Dog &
Blur Studio.

Social Media Communities proposed ( busy? Check it later, if you are not already in some of them):

Please be invited to the user-generated facebook group (Redirecting...).

Make sure to drop by 'cebas Visual Technology Inc. official page and give us a Like to stay on top of things (Cebas Visual Technology Inc. | Victoria BC).
If you are in architectural or project rendering then Like us as well at Redirecting... (rendering)

Country-specific TP groups:
(note: current America and Europe continents are with the main English language groups stated above.
There are some facebook VFX groups in German, Spanish, French and cebas may use those groups for announcement)

Other Cebas supported fb pages/groups includes,
Redirecting... (VFX world who’s who and where)
Videomapping 3D mapping | Victoria BC ( 3D Videomapping)
Redirecting... (medical animation vfx)
Redirecting... (cg art)

Architectural visualization / technical illustrations/ game animation / PSD:
Redirecting... ( 3D home design (Max) дизайн дома )
Redirecting...

ASIA: language-specific

And if you’re on LinkedIn:
LinkedIn Login, Sign in | LinkedIn.
LinkedIn Login, Sign in | LinkedIn

Google + Google Workspace Updates: New community features for Google Chat and an update on Currents

You can also find useful learning and inspirational vfx videos at cebas.com Gallery & http://www.youtube.com/cebasVT

Feel free to email me if you need additional information. Thank you, and have fun!

Best regards,
Cedar Thokme (Ms.)
Social Media Office Manager
c.thokme@cebas.com