Esempio n. 1
0
 def RB_HAN_FILE(self):#3  copy max.7z and so on
     self.format_log('拷贝脚本文件','start')
     self.G_DEBUG_LOG.info('[BASE.RB_HAN_FILE.start.....]'+self.G_RENDER_CORE_TYPE)
     
     CLASS_COMMON_UTIL.python_move(self.G_WORK_RENDER_TASK_OUTPUT,self.G_WORK_RENDER_TASK_OUTPUTBAK)
   
     self.G_DEBUG_LOG.info('[BASE.RB_HAN_FILE.end.....]')
     self.format_log('done','end')
Esempio n. 2
0
 def RB_HAN_FILE(self):#3  copy max.7z and so on
     self.format_log('拷贝脚本文件','start')
     self.G_DEBUG_LOG.info('[RenderMax.RB_HAN_FILE.start.....]'+self.G_RENDER_CORE_TYPE)
     
     CLASS_COMMON_UTIL.python_move(self.G_WORK_RENDER_TASK_OUTPUT,self.G_WORK_RENDER_TASK_OUTPUTBAK)
     
     if int(self.G_CG_TILE_COUNT)>1 and self.G_CG_TILE_COUNT==self.G_CG_TILE:#merge Pic
         self.G_RENDER_WORK_TASK_BLOCK=os.path.join(self.G_RENDER_WORK_TASK,'block').replace('/','\\')
         
         block_path1=os.path.join(self.G_TEMP_PATH,self.G_TASK_ID,'block').replace('/','\\')
         self.G_DEBUG_LOG.info(block_path1)
         if not os.path.exists(block_path1):
             CLASS_COMMON_UTIL.error_exit_log(self.G_DEBUG_LOG,'block not exists in temp folder')
         copy_block_cmd='c:\\fcopy\\FastCopy.exe   /speed=full /force_close  /no_confirm_stop /force_start "'+block_path1+'\\*.*" /to="'+self.G_RENDER_WORK_TASK_BLOCK.replace('/','\\')+'"'
         # copy_block_cmd=copy_block_cmd.encode(sys.getfilesystemencoding())
         CLASS_COMMON_UTIL.cmd(copy_block_cmd,my_log=self.G_DEBUG_LOG)
     else:
     
         #----------------copy max 7z-------------------
         max_7z=os.path.join(self.G_TEMP_PATH,'max.7z')
         if not os.path.exists(max_7z):
             CLASS_COMMON_UTIL.error_exit_log(self.G_DEBUG_LOG,'max.7z not exists in temp folder')
         copy_max_7z_cmd='c:\\fcopy\\FastCopy.exe /cmd=diff /speed=full /force_close  /no_confirm_stop /force_start "'+max_7z.replace('/','\\')+'" /to="'+self.G_WORK_RENDER_TASK_MAX.replace('/','\\')+'"'
         self.G_DEBUG_LOG.info(copy_max_7z_cmd)
         # CLASS_COMMON_UTIL.cmd(copy_max_7z_cmd.encode(sys.getfilesystemencoding()),my_log=self.G_DEBUG_LOG,my_shell=True)
         CLASS_COMMON_UTIL.cmd(copy_max_7z_cmd,my_log=self.G_DEBUG_LOG,my_shell=True)
         node_max_7z=os.path.join(self.G_WORK_RENDER_TASK_MAX,'max.7z')
         if not os.path.exists(node_max_7z):
             CLASS_COMMON_UTIL.error_exit_log(self.G_DEBUG_LOG,('max.7z not exists in '+self.G_WORK_RENDER_TASK_MAX))
         
         #----------------send cmd to node-------------------
         self.vray_distribute_node()
         
         #------------------unpack max.7z----------------
         self.G_DEBUG_LOG.info('unpack 7z...')
         unpack_cmd=self.G_DRIVERC_7Z+' x "'+node_max_7z+'" -y -aos -o"'+self.G_WORK_RENDER_TASK_MAX+'"' 
         self.G_DEBUG_LOG.info(unpack_cmd)
         # CLASS_COMMON_UTIL.cmd(unpack_cmd.encode(sys.getfilesystemencoding()),my_log=self.G_DEBUG_LOG,my_shell=True)
         CLASS_COMMON_UTIL.cmd(unpack_cmd,my_log=self.G_DEBUG_LOG,my_shell=True)
         
         #----------------copy photon-------------------
         self.copy_photon()
         
     self.G_DEBUG_LOG.info('[RenderMax.RB_HAN_FILE.end.....]')
     self.format_log('done','end')