0
$\begingroup$

I want to type some message for people to see when they just installed the add-on. I need a message to them in add-on preferences. How can I do it?

$\endgroup$
2
  • $\begingroup$ Do you mean you need to show your text in add-on preference? $\endgroup$
    – 8N Films
    Commented Apr 3, 2021 at 10:44
  • $\begingroup$ Yes, do you know how? Please answer $\endgroup$
    – David Wong
    Commented Apr 3, 2021 at 10:44

1 Answer 1

0
$\begingroup$

Type your text in add-on preference script:

bl_info = {
    "name": "Example add-on",
    "author": "Your name here",
    "version": (1, 0),
    "blender": (2, 92, 0),
    "location": "Your location here",
    "description": "Your description here",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development",
}


import bpy

class AddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__
    def draw(self, context):
        layout = self.layout
        col = layout.column()
        #Type your text
        self.layout.label(text="Your text here")

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

def unregister():
    bpy.utils.unregister_class(AddonPreferences)

Finally I got this

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you. I have done successfully. $\endgroup$
    – David Wong
    Commented Apr 3, 2021 at 10:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .