glmSortParticleIds
As of August 5th, 2025, Golaem will no longer provide direct support.
All support for Autodesk Golaem will now be handled exclusively through Autodesk support channels and this website will be deactivated soon.
Please bookmark the Autodesk Golaem Support section for any future support needs related to Autodesk Golaem packages.
When creating a Particle System using the Population Tool, particles are emitted and placed randomly according to the shape of the Population Tool. Thus Particle Ids are not contiguous and ordered.
However sometimes it could be useful to order these Particle Ids along X axis or Z axis . To do so you can use the following command with axis = 0 to sort along the X axis, and axis = 1 to sort along the Z axis :
glmSortParticleIds(string particleSystemShapeName, int axis)
This function is located in glmPopulationToolUtils.mel file in the Golaem Crowd script directory.
Use this command in the Population Tool PostEmit callback to automatically sort Particle Ids in the freshly created Particle System.