demoCallMAXScript.py
Main Page
Modules
Classes
Examples
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
8
node =
MaxPlus.Factory.CreateNode
(obj)
9
node.Name =
'PythonCone001'
10
r =
MaxPlus.Core.EvalMAXScript
(
'$'
+ node.Name)
11
print
r.Type, r.Get()