def loadAttribute(self, attributeName, float3Array=False): vals = effects.getParticleAttr(self.__shapeName, at=attributeName, array=True) if float3Array: vals = unflattenFloat3Array(vals) self.__data[attributeName] = dict(zip(self.__ids, vals))
def getParticleIds(shapeName): """Get a list of all the particle ids in a shape. Only the active particles are returned, dead particles are not in the result set. shapeName is either the name of the shape, or its transform.""" return effects.getParticleAttr(shapeName, at="particleId", array=True)
def getParticlePositions(shapeName): positions = effects.getParticleAttr(shapeName, at="position", array=True) return unflattenFloat3Array(positions)