Ejemplo n.º 1
0
def main():
    MaxPlus.FileManager.Reset(True)

    simbatch = simbatch_core.SimBatch("3dsMAX", ini_file=simbatch_config_ini)
    loading_data_state = simbatch.load_data()
    simbatch_srv = simbatch_server.SimBatchServer(simbatch,
                                                  framework_mode=True)
    simbatch_main_window = simbatch_ui.MainWindow(simbatch_srv, parent=None)

    MaxPlus.AttachQWidgetToMax(simbatch_main_window)

    simbatch_main_window.show()
Ejemplo n.º 2
0
 def run_server_from_framework(self, loops=0):
     server = simbatch_server.SimBatchServer(self.batch, force_local=True)
     server.loopsLimit = loops
     server.timerDelaySeconds = 0
     server.reset_report()
     server.run()
     report = server.generate_report()
     if report[0] > 0:
         self.reload_queue_data_and_refresh_list()
         if report[0] == 1:
             self.top_ui.set_top_info(server.last_info, 1)
         else:
             self.top_ui.set_top_info(("total computed:", report[0],
                                       "   last", server.last_info), 6)
     else:
         if len(server.last_info) > 0:
             self.top_ui.set_top_info(server.last_info, 1)
Ejemplo n.º 3
0
try:  # Maya 2015 and 2016
    import shiboken
except ImportError:
    try:  # Maya 2017
        import shiboken2 as shiboken
    except ImportError:
        print "shiboken import ERROR"

try:
    simbatch_window.close()
except:
    pass


def get_maya_window():
    pointer = mui.MQtUtil.mainWindow()
    return shiboken.wrapInstance(long(pointer), QWidget)


maya_window = get_maya_window()

simbatch = simbatch_core.SimBatch("Maya", ini_file=simbatch_config_ini)
loading_data_state = simbatch.load_data()
simbatch_server = simbatch_server.SimBatchServer(simbatch, framework_mode=True)

if simbatch.sts.with_gui == 1:
    simbatch_window = simbatch_ui.MainWindow(simbatch_server,
                                             parent=maya_window)
    simbatch_window.show()
    simbatch_window.post_run(loading_data_state)
Ejemplo n.º 4
0
simbatch_config_ini = "/job/simbatch_test/config.ini"

import simbatch.core.core as simbatch_core

import simbatch.server.server as simbatch_server

# SBS = SimBatchServer( settings ,  Queue( settings ) ,  SimNodes( settings ),  soCo )

no_gui_batch = simbatch_core.SimBatch("Server", ini_file=simbatch_config_ini)
no_gui_batch.logger.console_level = 3

sim_batch_server = simbatch_server.SimBatchServer(no_gui_batch)
sim_batch_server.loopsLimit = 4
sim_batch_server.run()

# print "\n\nAFTER", sim_batch_server.last_info