0
$\begingroup$

I compile little addon work fine but, Question is: Is possible make "Report a bug" button in Addon preference link to my mail?

$\endgroup$
  • 1
    $\begingroup$ Wouldn't make it an email link. Rather set up a github (or other source hosting) account and link to the issues page. github will send an email when a new issue is posted. $\endgroup$ – batFINGER Apr 5 at 7:38
  • $\begingroup$ @ batFINGER i put in the "tracker_url" ( bl_info ) my mail with "mailto:someone@somemail.somedomain" (Credit @Ty Martin Z). Is not a good way? $\endgroup$ – Pastrokkio Apr 5 at 8:23
1
$\begingroup$
import bpy

bl_info = {
    'name': 'Add-on',
    'category': 'User'
}

class MyAddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__
    def draw(self, context):
        layout = self.layout
        col = layout.column()
        col.operator("wm.url_open", text="Report a Bug").url="mailto:someone@somemail.somedomain"

def register():
    bpy.utils.register_class(MyAddonPreferences)

def unregister():
    bpy.utils.unregister_class(MyAddonPreferences)
$\endgroup$
  • 1
    $\begingroup$ Set as the "tracker_url" member of the bl_info dictionary to generate the standard report bug button. $\endgroup$ – batFINGER Apr 5 at 7:49
  • $\begingroup$ Ty Martin Z is good alternative, but i think batFiNGER is a better way because need only 1 line of python $\endgroup$ – Pastrokkio Apr 5 at 8:20
  • 2
    $\begingroup$ Mailto link might not be a good design decision because a people use emails from web browsers and the links might not work if they don't have mail client set up. I think linking to GitHub is a better solution, but I tried to answer the question - this is how you would put it in the add-on's preferences. $\endgroup$ – Martynas Žiemys Apr 5 at 8:32
  • 1
    $\begingroup$ @Andrea Not better, put in dictionary for the standard bug tracker button and as in MartinZ 's answer for a "Contact Me" button (eg) (IMO not worth another answer for that point of difference MZ can edit into this one) Don't recommend using an email link to do this. (lol sidetracked must have started this comment over 5 mins ago) $\endgroup$ – batFINGER Apr 5 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.