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 set_renderpath(self, context): global updating_preset if updating_preset == True: return # assets.invalidate_compiled_data(self, context) assets.invalidate_shader_cache(self, context) make_renderer(arm.utils.get_rp())
def set_renderpath(self, context): global updating_preset if updating_preset == True: return if bpy.context.camera == None: return assets.invalidate_shader_cache(self, context) make_renderer.make_renderer(bpy.context.camera) bpy.context.camera.renderpath_path = 'armory_default'
def update_material_model(self, context): assets.invalidate_shader_cache(self, context) update_renderpath(self, context)
def update_renderpath(self, context): if assets.invalidate_enabled == False: return assets.invalidate_shader_cache(self, context) bpy.data.worlds['Arm'].arm_recompile = True