@publisher(LOOK_DEV_TYPES)
def check_all_tx_textures():
    v = staging.get('version')
    if v and Representation.repr_separator in v.take_name:
        return

    texture_file_paths = []
    workspace_path = pm.workspace.path

    def add_path(path):
        if path != '':
            path = os.path.expandvars(path)
            if not os.path.isabs(path):
                path = \
                    os.path.normpath(os.path.join(workspace_path, path))
            texture_file_paths.append(path)

    for node in pm.ls(type='file'):
        add_path(node.fileTextureName.get())

    for node in pm.ls(type='aiImage'):
        add_path(node.filename.get())

    import glob

    textures_with_no_tx = []
    for path in texture_file_paths:
        tx_path = '%s.tx' % os.path.splitext(path)[0]
        # replace any <udim> value with *
        tx_path = tx_path.replace('<udim>', '*')

        if not len(glob.glob(tx_path)):
            textures_with_no_tx.append(path)

    if len(textures_with_no_tx):
        raise PublishError('There are textures with no <b>TX</b> file!!!')
Set an attribute value on the given instance and 'commit' it.
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/publish.py/check_all_tx_textures--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py/CollectionAttributeImpl.set_committed_value