demoCallMAXScript.py

demoCallMAXScript.py
1 '''
2  Demonstrates calling a MAXScript expression and getting a node value from it.
3 '''
4 import MaxPlus
5 obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Cone)
6 obj.ParameterBlock.radius1.Value = 5.0
7 obj.ParameterBlock.radius2.Value = 10.0
9 node.Name = 'PythonCone001'
10 r = MaxPlus.Core.EvalMAXScript('$' + node.Name)
11 print r.Type, r.Get()