# Resort

Objects
Position
4.9.1.0 GWE
bool
object obj Object to be resorted. Can be 0 in local calls. If 0 in a global call all objects will be resorted (used to fix sorting errors).
Resorts a single object in the internal object array.
Objects are primarily sorted by the main categories (C4D_StaticBack through C4D_Object) and secondarily by their object definition (newly placed definitions are placed at the end of the list, so they are drawn at the very top). C4D_StaticBack objects, however, are not sorted by definition.
Internal sorting is always done at the end of each executed frame.
var obj; while (obj = FindObject(ELEC, 0,0,0,0, 0, 0,0, 0, obj)) Resort(obj);
Makes sure that elevator cases are placed before all other objects.
ResortObjects
SetObjectOrder
Sven2
2003-05