@classmethod
    def create_follicle(cls, component):
        follicleShape = pm.createNode('follicle')

        geometry = component.node()
        uv = None

        if isinstance(geometry, pm.nt.Mesh):
            geometry.attr('outMesh') >> follicleShape.attr('inputMesh')
            # get uv
            uv = component.getUV()
        elif isinstance(geometry, pm.nt.NurbsSurface):
            geometry.attr('local') >> follicleShape.attr('inputSurface')
            # get uv
            # TODO: Fix this
            uv = [0, 0]

        geometry.attr('worldMatrix[0]') >> follicleShape.attr(
            'inputWorldMatrix')

        follicleShape.setAttr('pu', uv[0])
        follicleShape.setAttr('pv', uv[1])

        # set simulation to static
        follicleShape.setAttr('simulationMethod', 0)

        # connect to its transform node
        follicle = follicleShape.getParent()

        follicleShape.attr('outTranslate') >> follicle.attr('t')
        follicleShape.attr('outRotate') >> follicle.attr('r')

        return follicle
creates a follicle at given component
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/toolbox.py/Rigging.create_follicle