コード例 #1
0
    def __init__(self):
        """gets networking information, initalizes  client"""

        self.host, self.port = utils.get_net_info('ZNET')
        self.status = False
        self.sock = None
        self.objs = None
        self.goz_id = None
        self.goz_obj = None
        self.ascii_path = None
コード例 #2
0
    def __init__(self):
        zhost, zport = utils.get_net_info('ZNET')
        mhost, mport = utils.get_net_info('MNET')

        self.serv = zbrush_tools.ZBrushServer(zhost, zport)
        self.client = zbrush_tools.MayaClient(mhost, mport)

        self.maya_status_ui = None
        self.maya_host_ui = None
        self.maya_port_ui = None

        self.zbrush_port_ui = None
        self.zbrush_status_ui = None
        self.win = None

        self.build()
        self.serv_start()
        self.test_client()
        self.zscript_ui()
        self.win.mainloop()
コード例 #3
0
    def __init__(self):
        zhost, zport = utils.get_net_info('ZNET')
        mhost, mport = utils.get_net_info('MNET')

        self.serv = zbrush_tools.ZBrushServer(zhost, zport)
        self.client = zbrush_tools.MayaClient(mhost, mport)

        self.maya_status_ui = None
        self.maya_host_ui = None
        self.maya_port_ui = None

        self.zbrush_port_ui = None
        self.zbrush_status_ui = None
        self.win = None

        self.build()
        self.serv_start()
        self.test_client()
        self.zscript_ui()
        self.win.mainloop()
コード例 #4
0
    def __init__(self):

        # setup host/port, set server to 'down', create a port and try to
        # connect
        self.host, self.port = utils.get_net_info('ZNET')
        self.status = False
        self.sock = None
        self.objs = None
        self.goz_id = None
        self.goz_obj = None
        self.ascii_path = None
コード例 #5
0
    def send(obj_name):
        """ sends a file to maya"""

        # construct file read path for maya, uses SHARED_DIR_ENV
        # make realative path
        file_path = utils.make_fp_rel(obj_name)

        print file_path

        maya_cmd = 'import maya_tools;maya_tools.load("' + file_path + '")'

        maya = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        host, port = utils.get_net_info('MNET')

        print host, port

        maya.connect((host, int(port)))
        maya.send(maya_cmd)
        maya.close()
コード例 #6
0
    def send(obj_name, parent_name):
        """
        sends a file to maya

        includes filepath, object name, and the "parent"

        The parent is the top level tool or sub tool 0 of the current tool
        this is used to preserve organization when loading back into ZBrush

        connects to maya commandPort and sends the maya commands

        """
        print 'Parent tool: ' + parent_name

        # construct file read path for maya, uses SHARED_DIR_ENV
        # make realative path
        file_path = utils.make_fp_rel(obj_name)

        print file_path

        # previous import was not looking inside of GoZ package maybe?
        # this could have been the error with sending back to maya previously
        maya_cmd = 'from GoZ import maya_tools;maya_tools.load("' + \
            file_path + '","' + obj_name + \
            '","' + \
            parent_name + \
            '")'

        print maya_cmd

        maya = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        host, port = utils.get_net_info('MNET')

        print host, port

        maya.connect((host, int(port)))
        maya.send(maya_cmd)
        maya.close()
コード例 #7
0
    def __init__(self):
        self.host, self.port = utils.get_net_info('MNET')

        self.cmdport_name = "%s:%s" % (self.host, self.port)
        self.status = False
コード例 #8
0
    def __init__(self):
        """gets networking info, creates command port name """
        self.host, self.port = utils.get_net_info('MNET')

        self.cmdport_name = "%s:%s" % (self.host, self.port)
        self.status = False