コード例 #1
0
ファイル: so_flocking.py プロジェクト: skurmedel/mayascripts
    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))
コード例 #2
0
ファイル: so_flocking.py プロジェクト: skurmedel/mayascripts
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)
コード例 #3
0
ファイル: so_flocking.py プロジェクト: Kabalism/mayascripts
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)
コード例 #4
0
ファイル: so_flocking.py プロジェクト: skurmedel/mayascripts
def getParticlePositions(shapeName):
    positions = effects.getParticleAttr(shapeName, at="position", array=True)

    return unflattenFloat3Array(positions)
コード例 #5
0
ファイル: so_flocking.py プロジェクト: Kabalism/mayascripts
	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))
コード例 #6
0
ファイル: so_flocking.py プロジェクト: Kabalism/mayascripts
def getParticlePositions(shapeName):
	positions = effects.getParticleAttr(shapeName, at="position", array=True)

	return unflattenFloat3Array(positions)