update templates for registration changes
[blender.git] / release / scripts / templates / panel_simple.py
1 import bpy
2
3
4 class OBJECT_PT_hello(bpy.types.Panel):
5     bl_label = "Hello World Panel"
6     bl_space_type = "PROPERTIES"
7     bl_region_type = "WINDOW"
8     bl_context = "object"
9
10     def draw(self, context):
11         layout = self.layout
12
13         obj = context.object
14
15         row = layout.row()
16         row.label(text="Hello world!", icon='WORLD_DATA')
17
18         row = layout.row()
19         row.label(text="Active object is: " + obj.name)
20         row = layout.row()
21         row.prop(obj, "name")
22
23
24 def register():
25     bpy.utils.register_class(OBJECT_PT_hello)
26
27
28 def unregister():
29     bpy.utils.unregister_class(OBJECT_PT_hello)    
30
31
32 if __name__ == "__main__":
33     register()