Using the Object Model will allow you to do this. This code you've written is using Commands.

# Python
si = Application
sel = si.Selection
log = si.LogMessage

# Set Path Percentage
targetObj = sel(0)
constraints = targetObj.Kinematics.Constraints
pathConstraint = constraints(0) # Zero only works if it is the first constraint. Iterate through 'constraints' to find the one you want
pathConstraint.Parameters("percentage").Value = 50

# Loop through params
for eachParam in pathConstraint.Parameters:
   log(eachParam.Name)
   log(eachParam.Value)



On Friday, December 20, 2013 11:31:08 AM, Benoit Delaunay wrote:
Hi list,

How do you get to a parameter to change its value ? Or even better, is
there a way to return a list of all the parameters ? For instance, I
want to set the 'Path %age' value of a path constrain. In the
expression editor it seems to be 'perc' but I cannot get it to work.

Application.SetValue(Application.Selection(0).kinematics.Constraints.percentage,
4, "")


Same thing for kine (expression) which becomes kinematics, and all
these other things. Is there a way to find their scripting names ?


In maxscript it would be 'show $.modifiers[1]'

Reply via email to