I followed a tutorial on youtube showing how to make a simple panel on blender, i copied it one to one but the panel is no nowhere to be seen. The script runs fine without errors and I have no idea of what is wrong.
I'm using blender 2.90 following this tutorial:
import bpy
class TestPanel(bpy.types.Panel):
bl_label = "Test Panel"
bl_idname = "PT_TestPanel"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'My 1st Addon'
def draw(self, context):
layout = self.layout
row = layout.row()
row.label(text = "Sample Text")
def register():
bpy.utils.register_class(TestPanel)
def unregister():
bpy.utils.unregister_class(TestPanel)
if name == "__main_":
register()
_PT_) to the name of your panel class according to 2.8x API changes. ReplaceTestPanelbyMYADDON_PT_TestPaneland even more important: assign it tobl_idname->bl_idname = "MYADDON_PT_TestPanel"otherwise you'll get an error in the console. Recommend to read: How to create a custom UI?. – brockmann Jun 16 '20 at 01:50