[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 facebook.com/cebasVT . 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 http://www.effectivetds.com/forum/
The forums are for serious learners. And Matt Radford’s https://realtimevfx.com/categories (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 (https://www.facebook.com/groups/thinkingparticles/).

Make sure to drop by 'cebas Visual Technology Inc. official page and give us a Like to stay on top of things (https://www.facebook.com/cebasVT).
If you are in architectural or project rendering then Like us as well at https://www.facebook.com/rendersoftware/ (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,
https://www.facebook.com/VFX-Whos-Where-502439073289623/?fref=ts (VFX world who’s who and where)
https://www.facebook.com/videomappers/ ( 3D Videomapping)
https://www.facebook.com/medicalVFX/ (medical animation vfx)
https://www.facebook.com/groups/cgartscg/ (cg art)

Architectural visualization / technical illustrations/ game animation / PSD:
https://www.facebook.com/groups/CGdesigner/ ( 3D home design (Max) дизайн дома )
https://www.facebook.com/groups/finalToon/

ASIA: language-specific


https://www.facebook.com/groups/koreavfx/

And if you’re on LinkedIn:
https://www.linkedin.com/groups/6950574.
https://www.linkedin.com/company-beta/1527590/

Google + https://plus.google.com/+cebasVT/posts/

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
[email protected]