コード例 #1
0
ファイル: ms_shelf.py プロジェクト: jonathantopf/mayaseed
def get_export_node():
    render_settings_nodes = cmds.ls(type='ms_renderSettings')
    if len(render_settings_nodes) > 0:
        if len(render_settings_nodes) == 1:
            return render_settings_nodes[0]
        else:
            render_settings_nodes = cmds.ls(type='ms_renderSettings')
            export_node = cmds.confirmDialog(title='', message='Select a render settings node to export.', button=render_settings_nodes)
            if export_node != 'dismiss':
                return export_node
    else:
        ms_commands.error('No render settings nodes present')
        return None
コード例 #2
0
ファイル: ms_shelf.py プロジェクト: ckod3/mayaseed
def get_export_node():
    render_settings_nodes = cmds.ls(type='ms_renderSettings')
    if len(render_settings_nodes) > 0:
        if len(render_settings_nodes) == 1:
            return render_settings_nodes[0]
        else:
            render_settings_nodes = cmds.ls(type='ms_renderSettings')
            export_node = cmds.confirmDialog(
                title='',
                message='Select a render settings node to export.',
                button=render_settings_nodes)
            if export_node != 'dismiss':
                return export_node
    else:
        ms_commands.error('No render settings nodes present')
        return None
コード例 #3
0
ファイル: ms_shelf.py プロジェクト: ckod3/mayaseed
def export_no_deps(node):
    if node is not None:

        tex_export = cmds.getAttr(node + '.overwrite_existing_textures')
        geo_export = cmds.getAttr(node + '.overwrite_existing_geometry')

        cmds.setAttr(node + '.overwrite_existing_textures', 0)
        cmds.setAttr(node + '.overwrite_existing_geometry', 0)

        ms_export.export(node)

        cmds.setAttr(node + '.overwrite_existing_textures', tex_export)
        cmds.setAttr(node + '.overwrite_existing_geometry', geo_export)

    else:
        ms_commands.error('No render settings nodes present')
コード例 #4
0
ファイル: ms_shelf.py プロジェクト: jonathantopf/mayaseed
def export_no_deps(node):
    if node is not None:

        tex_export = cmds.getAttr(node + '.overwrite_existing_textures')
        geo_export = cmds.getAttr(node + '.overwrite_existing_geometry')

        cmds.setAttr(node + '.overwrite_existing_textures', 0)
        cmds.setAttr(node + '.overwrite_existing_geometry', 0)

        ms_export.export(node)

        cmds.setAttr(node + '.overwrite_existing_textures', tex_export)
        cmds.setAttr(node + '.overwrite_existing_geometry', geo_export)

    else:
        ms_commands.error('No render settings nodes present')