from MaxPlus import Point3 as MyPoint3 for item in dir(MyPoint3): print item
import MaxPlus help(MaxPlus.Asset)
action = MaxPlus.ActionFactory.Create('Do something', 'Python demo', doSomething) help(type(action))
action = MaxPlus.ActionFactory.Create('Do something', 'Python demo', doSomething) at = type(action) for k in dir(at): print "I have an attribute named ", k, " which has a value, ", getattr(action, k)
The dir(object) function, when passed an argument (object), returns a list of attributes for the object.
The getattr(object, name) function returns the value of the named attribute of the object.
import MaxPlus xs = MaxPlus.IntList() xs.Append(3) xs.Append(4) xs.Append(5) for x in xs: print x
Some of these classes include lists such as: Point3List, Point4List, StrList, ReferenceTargetList, IntList, FloatList and so forth.
You can create an exclusion list, for example, so that specific nodes are excluded from being illuminated by a light. Create an exclusion list for your object (for example, your light) using ParameterBlock.excludeList. Then create a node for the object that you want to exclude and append the node to the exclude list. An example is as follows:
import MaxPlus #Create your light obj = MaxPlus.Factory.CreateOmniLight() #Create an exclusion list for your light excludeList = obj.ParameterBlock.excludeList v = excludeList.Value #Create a node for the object you want to exclude node = MaxPlus.Factory.CreateNode(MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Cone)) #Append the node to the exclude list v.Append(node) #Tie the exclude list back to the Value property excludeList.Value = v #Create a node for your light object LightNode = MaxPlus.Factory.CreateNode(obj)
Now if you select LightNode, then click Exclude in the Modify panel in the UI, you can see that the cone belongs to the light's exclusion list.