Example #1
0
 def __init__(self, path=None, paths=None, image=None):
     self.path = path
     self.paths = paths
     self.image = image
     self.tool_kit_object, self.tool_kit_name, self.version = platforms.get_tool_kit()
     self.output_path = tempfile.gettempdir()
     self.asset_setname = 'asset_set'
     self.maya_formats = {'.mb': 'mayaBinary', '.ma': 'mayaAscii'}
     self.maya_file_types = {'mayaBinary': '.mb', 'mayaAscii': '.ma'}
Example #2
0
 def __init__(self, parent=None, standalone=False):
     super(MainWindow, self).__init__(parent)
     self.standalone = standalone
     self.image_object = None
     self.width, self.height = [500, 500]
     self.publish_format = 'asset'
     self.image_format = 'png'
     self.tool_mode = 'publish'
     self.currnet_publish = None
     self.q_image, self.q_image_path = None, None
     self.source_file, self.source_file_path = None, 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)
     self.preference = preferences.Preference(parent=None)
     self.catalogue = catalogue.Catalogue(parent=None)
     self.asset = asset.Asset(parent=None)
     self.folder = studioFolder.Folder()
     # 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='asset_library')
     inputs = self.rw.get_inputs()
     self.create_type_values = ['None', 'import', 'reference']
     self.maya_type_values = ['None', 'mayaAscii', 'mayaBinary']
     self.maya_path = inputs[0]
     self.library_path = inputs[1]
     self.create_type = self.create_type_values[inputs[2]]
     self.maya_type = self.maya_type_values[inputs[3]]
     self.output_path = inputs[4]
     self.setup_ui()
     self.set_icons()
     self.load_library_folders(self.treewidget)
     if not self.standalone:
         self.parent_maya_layout()
     self.set_contex_menu()
     self.studio_print = studioPrint.Print(self.standalone,
                                           self.textedit_console)
Example #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 = {
         0: {
             'label': 'Maya Directory',
             'tag': 'maya_directory',
             'path': None
         },
         1: {
             'label': 'Library Directory',
             'tag': 'library_directory',
             'path': None
         },
         2: {
             'label': 'Create Type',
             'tag': 'create_type',
             'types': ['None', 'import', 'reference'],
             'value': 0
         },
         3: {
             'label': 'Maya File Type',
             'tag': 'maya_file_type',
             'types': ['None', 'mayaAscii', 'mayaBinary'],
             'value': 0
         },
         4: {
             'label': 'Output Directory',
             'tag': 'output_directory',
             'path': None
         }
     }
     self.setup_ui()
     self.create_preference()
     self.create_widgets()
Example #4
0
# Copyright(c) 2018, Subin Gopi
# All rights reserved.

# WARNING! All changes made in this file will be lost!

Description
    None.
'''

import os
import platform

from assetLibrary_maya2017.utils import 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():