PathNames provide the mechanism for naming objects in the 3ds Max scene. See also Pathname Literals. Pathname values are mappable.
Returns center of bounding box of all objects in pathname.
Returns maximum corner of bounding box.
Returns minimum corner of bounding box.
Returns number of objects in set. This property is only valid for wild-carded pathnames, i.e., a pathname that could contain more than one scene object.
Accesses member of collection. Indexes start at 1.
Converts pathname collection to an array
This function yields the result true if the object has been deleted and false if it still exists in the scene. Using the function only makes sense in situations where references to 3ds Max objects are held in variables or arrays or passed as parameters and you want to determine whether the object has been deleted from the scene. Performing an operation on a deleted 3ds Max object referenced in a variable or array otherwise generates an exception. Any kind of 3ds Max object can be tested in this way, scene objects, modifiers, controllers, materials, etc.
myBoxes = $box* as array -- store list of all boxes in array myBoxes
-- by the user or other scripts>
for obj in myBoxes
where not isDeleted obj do
The order of sequencing is consistent in a stable scene but somewhat arbitrary - it depends on how 3ds Max stores its object hierarchy internally which is affected mostly by order of additions and deletions to and from the scene.
MAXScript lets you set up
a 'working level' in the 3ds
Max scene hierarchy that
affects pathnames and coordinate systems and object creation. You
do this with a
a = $*feet*[i] -- retrieves the i’th object in the *feet*'s
-- tell me what things inside dummy have a non-identity scale
for obj in $dummy...*
where obj.scale != [1,1,1]
do format "% has non-identity scale: %\n" obj.name obj.scale
-- place $foo's pivot point at the max corner of the set of 'box*' objects.
$foo.pivot = $box*.max
sphere name:"ear1" pos:[10,10,10] -- create as children of $dummy
sphere name:"ear2" pos:[-10,10,10]
scale $foo/* [1,1,2] -- looks for 'foo' as a child of $dummy