def plugin_config(self): if self.G_CG_CONFIG_DICT.has_key('plugins'): print(self.G_CG_CONFIG_DICT) plugin_dict = self.G_CG_CONFIG_DICT['plugins'] for plugins_key in plugin_dict.keys(): plugin_str = plugins_key + plugin_dict[plugins_key] node = self.get_node(self.G_NODE_NAME) plugin_mgr = C4dPluginMgr(self.G_USER_ID, self.G_PLUGIN_PATH) #plugin_mgr.copy_R18_exe(self.G_CG_VERSION) #self.G_DEBUG_LOG.info('copy_R18_exe was done!!!') for key, value in self.G_CG_CONFIG_DICT['plugins'].items(): print(key, value, self.G_CG_VERSION) plugin = C4dPlugin() plugin.plugin_name = key plugin.plugin_version = value plugin.soft_version = self.G_CG_VERSION plugin.node = node c4d_plugin_config = '[ python = "' + self.G_NODE_PY + r'\CG\C4d\function\C4dPluginManager.py" "%s" "%s" "%s" "%s" ]' % (plugin.plugin_name, \ plugin.plugin_version, \ plugin.soft_version, \ plugin.node) #print c4d_plugin_config self.G_DEBUG_LOG.info(c4d_plugin_config) result = plugin_mgr.set_custom_env(plugin) else: print('There is no key with plugins in the task.json')
def RB_CONFIG(self): self.G_DEBUG_LOG.info('[C4d.Plugin.config.begin......]') if self.G_CG_CONFIG_DICT.has_key('plugins'): print self.G_CG_CONFIG_DICT plugin_dict = self.G_CG_CONFIG_DICT['plugins'] for plugins_key in plugin_dict.keys(): plugin_str = plugins_key + plugin_dict[plugins_key] node = get_node(self.G_NODE_NAME) plugin_mgr = C4dPluginMgr(self.G_USER_ID, self.G_PLUGIN_PATH) #plugin_mgr.copy_R18_exe(self.G_CG_VERSION) #self.G_DEBUG_LOG.info('copy_R18_exe was done!!!') for key, value in self.G_CG_CONFIG_DICT['plugins'].items(): print key, value, self.G_CG_VERSION plugin = C4dPlugin() plugin.plugin_name = key plugin.plugin_version = value plugin.soft_version = self.G_CG_VERSION plugin.node = node self.G_DEBUG_LOG.info(r'[ python = "C:\script\new_py\CG\C4d\function\C4dPluginManager.py" "%s" "%s" "%s" "%s" ]' % (plugin.plugin_name, \ plugin.plugin_version, \ plugin.soft_version, \ plugin.node)) result = plugin_mgr.set_custom_env(plugin) else: print 'There is no key with plugins in the task.json' self.G_DEBUG_LOG.info('[C4d.Plugin.config.end......]')
def plugin_config(self): if 'plugins' in self.G_CG_CONFIG_DICT: print((self.G_CG_CONFIG_DICT)) plugin_dict = self.G_CG_CONFIG_DICT['plugins'] #for plugins_key in list(plugin_dict.keys()): # plugin_str = plugins_key + plugin_dict[plugins_key] # node = self.get_node(self.G_NODE_NAME) plugin_mgr = C4dPluginMgr(self.G_USER_ID, self.G_PLUGIN_PATH) for key, value in list(self.G_CG_CONFIG_DICT['plugins'].items()): print((key, value, self.G_CG_VERSION)) plugin_str = key + value node = self.get_node(self.G_NODE_NAME) plugin = C4dPlugin() ''' #20180725update gpu_label = '' if self.G_PLATFORM == '21': #21:gpu gpu_label = key + '_GPU' ''' plugin.plugin_name = key plugin.plugin_version = value plugin.soft_version = self.G_CG_VERSION plugin.node = node c4d_plugin_config = '[ python = "' + self.G_NODE_PY + r'\CG\C4d\function\C4dPluginManager.py" "%s" "%s" "%s" "%s" ]' % (plugin.plugin_name, \ plugin.plugin_version, \ plugin.soft_version, \ plugin.node) self.G_DEBUG_LOG.info(c4d_plugin_config) self.G_DEBUG_LOG.info('[@KANADA_PLUGIN_CONFIG.NOW]') self.G_DEBUG_LOG.info(plugin.plugin_name + (' was set done!!!')) result = plugin_mgr.set_custom_env(plugin) if result == False: return False else: print('There is no key with plugins in the task.json') return True
def plugin_config(self): if 'plugins' in self.G_CG_CONFIG_DICT: print((self.G_CG_CONFIG_DICT)) plugin_dict = self.G_CG_CONFIG_DICT['plugins'] # 判断是否为gpu,gpu返回值是10,20180720update gpu_label = '' if self.G_PLATFORM == '10': gpu_label = '_GPU' for plugins_key in list(plugin_dict.keys()): plugin_str = plugins_key + plugin_dict[plugins_key] node = self.get_node(self.G_NODE_NAME) plugin_mgr = C4dPluginMgr(self.G_USER_ID, self.G_PLUGIN_PATH) #plugin_mgr.copy_R18_exe(self.G_CG_VERSION) #self.G_DEBUG_LOG.info('copy_R18_exe was done!!!') for key, value in list( self.G_CG_CONFIG_DICT['plugins'].items()): print((key, value, self.G_CG_VERSION)) plugin = C4dPlugin() if gpu_label == '10': # 如果是gpu直接加gpu_label plugin.plugin_name = key + gpu_label else: # 否则不加 plugin.plugin_name = key plugin.plugin_version = value plugin.soft_version = self.G_CG_VERSION plugin.node = node c4d_plugin_config = '[ python = "' + self.G_NODE_PY + r'\CG\C4d\function\C4dPluginManager.py" "%s" "%s" "%s" "%s" ]' % (plugin.plugin_name, \ plugin.plugin_version, \ plugin.soft_version, \ plugin.node) self.G_DEBUG_LOG.info(c4d_plugin_config) self.G_DEBUG_LOG.info('[@KANADA_PLUGIN_CONFIG.NOW]') self.G_DEBUG_LOG.info(plugin.plugin_name + (' was set done!!!')) result = plugin_mgr.set_custom_env(plugin) else: print('There is no key with plugins in the task.json')