コード例 #1
0
ファイル: main.py プロジェクト: wandth/subins_tutorials
    def __init__(self, parent=platforms.get_qwidget()):
        super(MainWindow, self).__init__(parent)
        self.image_object = None
        self.width, self.height = [500, 500]
        self.publish_format = 'shader'
        self.image_format = 'png'
        self.tool_mode = 'publish'
        self.currnet_publish = None

        self.preference = preferences.Preference(parent=None)
        self.folder = studioFolder.Folder()
        self.studio_maya = studioMaya.Maya()
        self.catalogue = catalogue.Catalogue(parent=None)
        self.model = model.Model(parent=None)
        self.tool_kit_object, self.tool_kit_name, self.version = platforms.get_tool_kit(
        )
        self.tool_kit_titile = '{} {}'.format(self.tool_kit_name, self.version)
        # to check the preferencees
        resource_path = resources.getResourceTypes()['preference'].encode()
        self.rw = readWrite.ReadWrite(t='preference',
                                      path=resource_path,
                                      format='json',
                                      name='library_preferences',
                                      tag='shader_library')
        self.library_paths = self.rw.get_library_paths()
        if cmds.dockControl(self.tool_kit_object, q=1, ex=1):
            cmds.deleteUI(self.tool_kit_object, ctl=1)

        self.setup_ui()
        self.set_icons()
        self.load_library_folders(self.treewidget)
        self.parent_maya_layout()
コード例 #2
0
 def __init__(self, geometry_dag_path=None, path=None):
     self.geometry_dag_path = geometry_dag_path
     self.path = path
     self.tool_kit_object, self.tool_kit_name, self.version = platforms.get_tool_kit()
     self.unknown_types = mayaNodes.unknown_types()
     self.default_nodes = mayaNodes.default_nodes()
     self.valid_attribute = mayaNodes.valid_attribute()
     self._node_types = mayaNodes.getShadingNodeTypes()
コード例 #3
0
 def __init__(self, parent=None):
     super(Preference, self).__init__(parent)
     self.brows_directory = resources.getWorkspacePath()
     self.module, self.lable, self.version = platforms.get_tool_kit()
     self.bundles = {}
     self.setup_ui()
     self.create_preference()
     self.create_widgets()
コード例 #4
0
ファイル: __init__.py プロジェクト: sniler/subins_tutorials
import os

from shaderLibrary.utils import platforms
reload(platforms)

CURRENT_PATH = os.path.dirname(__file__)
MODULE = platforms.get_tool_kit()[0]


def getInputPath(module=None):
    return os.path.join(CURRENT_PATH, 'inputs', '{}.json'.format(module))


def getIconPath():
    return os.path.join(CURRENT_PATH, 'icons')


def getPreferencePath():
    return os.path.join(getWorkspacePath(), 'preference')


def getWorkspacePath():
    return os.path.join(os.getenv('HOME'), 'Documents', MODULE)


def getPublishDirectory():
    return os.path.join(os.environ['HOME'], 'Walk_cycle', 'characters')


def getResourceTypes():
    data = {'preference': getPreferencePath(