I have been trying to create and set parameters on a point object, but setting some attributes do not work. I can create and set position and name, but cant access the parameter to turn it to a box, cross,
import MaxPlus aColour = MaxPlus.Color(128,0,0) d = mxp.Factory.CreateHelperObject(mxp.ClassIds.Point)
d.cross = False # does not get set
d.box = True # does not get set
derp = mxp.Factory.CreateNode(d, "myPointObject")
derp.Position = MaxPlus.Point3(0, 0, 0) # Works fine
derp.Size = 1500.0 # does not get set
derp.wirecolor = aColour # does not get set # derp.ParameterBlock.Parameters.Box.Value = True # throws error 1 # derp.Parameters.Box.Value = True # throws error 2
derp.box = True # does not get set
derp.cross = False # does not get set for d in d.ParameterBlock.Parameters: print d.Name, d.Value
print out of for loop:
size 20.0
centermarker False
axistripod False
cross True
box False
constantscreensize False
drawontop False
error 1:
AttributeError: 'generator' object has no attribute 'Box'
-- MAXScript callstack: -- thread data: threadID:58484
-- [stack level: 0] -- In top-level
error 2:
AttributeError: 'INode' object has no attribute 'Parameters'
-- MAXScript callstack: -- thread data: threadID:58484