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) arm.utils.check_default_props() 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 assets.invalidate_shader_cache(None, None) assets.invalidate_enabled = False make.build(item.arm_project_target, is_export=True) make.compile() 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) arm.utils.check_default_props() 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() assets.invalidate_enabled = False make.build(item.arm_project_target, is_publish=True, is_export=True) make.compile() 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 bpy.data.worlds['Arm'].arm_play_runtime != 'Browser' or not os.path.exists(arm.utils.get_fp() + "/khafile.js"): print('Generating HTML5 project for Kode Studio') make.build('html5') arm.utils.kode_studio() return{'FINISHED'}
def execute(self, context): if not arm.utils.check_saved(self): return {"CANCELLED"} arm.utils.check_default_props() if not os.path.exists(arm.utils.get_fp() + "/khafile.js"): print('Generating Krom project for Kode Studio') make.build('krom') arm.utils.kode_studio() return {'FINISHED'}
def execute(self, context): if bpy.data.worlds['Arm'].arm_runtime != 'Browser' or not os.path.exists(arm.utils.get_fp() + "/khafile.js"): print('Generating HTML5 project for Kode Studio') arm.utils.check_default_props() make.build('html5') if self.is_object: obj = bpy.context.object else: obj = bpy.context.scene item = obj.arm_traitlist[obj.arm_traitlist_index] pkg = arm.utils.safestr(bpy.data.worlds['Arm'].arm_project_package) hx_path = arm.utils.get_fp() + '/Sources/' + pkg + '/' + item.class_name_prop + '.hx' arm.utils.kode_studio(hx_path) return{'FINISHED'}
def execute(self, context): arm.utils.check_default_props() if not os.path.exists(arm.utils.get_fp() + "/khafile.js"): print('Generating Krom project for Kode Studio') make.build('krom') if self.is_object: obj = bpy.context.object else: obj = bpy.context.scene item = obj.arm_traitlist[obj.arm_traitlist_index] pkg = arm.utils.safestr(bpy.data.worlds['Arm'].arm_project_package) # Replace the haxe package syntax with the os-dependent path syntax for opening hx_path = arm.utils.get_fp() + '/Sources/' + pkg + '/' + item.class_name_prop.replace('.', os.sep) + '.hx' arm.utils.kode_studio(hx_path) return{'FINISHED'}
def execute(self, context): arm.utils.check_default_props() if not os.path.exists(os.path.join(arm.utils.get_fp(), "khafile.js")): print('Generating Krom project for IDE build configuration') make.build('krom') if self.is_object: obj = bpy.context.object else: obj = bpy.context.scene item = obj.arm_traitlist[obj.arm_traitlist_index] pkg = arm.utils.safestr(bpy.data.worlds['Arm'].arm_project_package) # Replace the haxe package syntax with the os-dependent path syntax for opening hx_path = os.path.join(arm.utils.get_fp(), 'Sources', pkg, item.class_name_prop.replace('.', os.sep) + '.hx') arm.utils.open_editor(hx_path) 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"} arm.utils.check_default_rp() state.target = make.runtime_to_target(in_viewport=False) state.is_export = False assets.invalidate_enabled = False make.build() make.compile(watch=True) assets.invalidate_enabled = True return {'FINISHED'}