def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} if not arm.utils.check_sdkpath(self): return {"CANCELLED"} if not arm.utils.check_engine(self): return {"CANCELLED"} arm.utils.check_projectpath(self) make_renderer.check_default() wrd = bpy.data.worlds['Arm'] item = wrd.arm_exporterlist[wrd.arm_exporterlist_index] if item.arm_project_rp == '': item.arm_project_rp = wrd.arm_rplist[wrd.arm_rplist_index].name # Assume unique rp names rplist_index = wrd.arm_rplist_index for i in range(0, len(wrd.arm_rplist)): if wrd.arm_rplist[i].name == item.arm_project_rp: wrd.arm_rplist_index = i break state.target = item.arm_project_target state.is_export = True assets.invalidate_shader_cache(None, None) assets.invalidate_enabled = False make.build_project() make.compile_project(watch=True) state.is_export = False wrd.arm_rplist_index = rplist_index assets.invalidate_enabled = True return {'FINISHED'}
def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} if not arm.utils.check_sdkpath(self): return {"CANCELLED"} if not arm.utils.check_engine(self): return {"CANCELLED"} self.report({'INFO'}, 'Publishing project, check console for details.') arm.utils.check_projectpath(self) make_renderer.check_default() wrd = bpy.data.worlds['Arm'] item = wrd.arm_exporterlist[wrd.arm_exporterlist_index] if item.arm_project_rp == '': item.arm_project_rp = wrd.arm_rplist[wrd.arm_rplist_index].name # Assume unique rp names rplist_index = wrd.arm_rplist_index for i in range(0, len(wrd.arm_rplist)): if wrd.arm_rplist[i].name == item.arm_project_rp: wrd.arm_rplist_index = i break make.clean_project() state.target = item.arm_project_target state.is_export = True assets.invalidate_enabled = False make.build_project(is_publish=True) make.compile_project(watch=True) state.is_export = False wrd.arm_rplist_index = rplist_index assets.invalidate_enabled = True target_name = make_utils.get_kha_target(state.target) files_path = arm.utils.get_fp_build() + '/' + target_name if target_name == 'html5': print('HTML5 files are being exported to ' + files_path) elif target_name == 'ios' or target_name == 'osx': # TODO: to macos print('XCode project files are being exported to ' + files_path + '-build') elif target_name == 'windows': print('VisualStudio 2017 project files are being exported to ' + files_path + '-build') elif target_name == 'windowsapp': print('VisualStudio 2017 project files are being exported to ' + files_path + '-build') elif target_name == 'android-native': print('Android Studio project files are being exported to ' + files_path + '-build/' + arm.utils.safestr(wrd.arm_project_name)) else: print('Makefiles are being exported to ' + files_path + '-build') return {'FINISHED'}
def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} if not arm.utils.check_camera(self): return {"CANCELLED"} if not arm.utils.check_sdkpath(self): return {"CANCELLED"} state.target = bpy.data.worlds['Arm'].arm_project_target assets.invalidate_enabled = False make.build_project(target=state.target) make.compile_project(target_name=state.target, watch=True) assets.invalidate_enabled = True return {'FINISHED'}
def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} if not arm.utils.check_camera(self): return {"CANCELLED"} if not arm.utils.check_sdkpath(self): return {"CANCELLED"} state.target = make.runtime_to_target(in_viewport=False) assets.invalidate_enabled = False make.build_project(target=state.target) make.compile_project(target_name=state.target, watch=True) assets.invalidate_enabled = True return {'FINISHED'}
def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} if not arm.utils.check_sdkpath(self): return {"CANCELLED"} if not arm.utils.check_engine(self): return {"CANCELLED"} make_renderer.check_default() state.target = make.runtime_to_target(in_viewport=False) state.is_export = False assets.invalidate_enabled = False make.build_project() make.compile_project(watch=True) assets.invalidate_enabled = True return {'FINISHED'}