fromomni.kit.viewport.menubar.renderimportget_instance,SingleRenderMenuItemBase# Define a custom menu item typedefcustom_single_render_menu_item(*args,**kwargs):classCustomSingleRenderMenuItem(SingleRenderMenuItemBase):def_option_clicked(self):# Do something when clicking the option icon on the right of this menu itemreturnreturnCustomSingleRenderMenuItem(*args,**kwargs)# Get the viewport render menu bar extension instanceextension=get_instance()# Register the custom menu item typeextension.register_menu_item_type(custom_single_render_menu_item)