diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-23 21:51:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-23 21:51:56 +0300 |
commit | 9d96399eeb5de8aaff5af1852b0d4ff16e626df1 (patch) | |
tree | 6471f27a52292d4f8c0f705813d8e9d4c130fb2f /release/scripts/templates | |
parent | 9feadd443a69484ec5b56af566d28758cc7ae119 (diff) |
- panel python template
- nicer syntax to capitalize words
Diffstat (limited to 'release/scripts/templates')
-rw-r--r-- | release/scripts/templates/panel_simple.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/release/scripts/templates/panel_simple.py b/release/scripts/templates/panel_simple.py new file mode 100644 index 00000000000..fd05e5031f7 --- /dev/null +++ b/release/scripts/templates/panel_simple.py @@ -0,0 +1,22 @@ +import bpy + +class OBJECT_PT_hello(bpy.types.Panel): + bl_label = "Hello World Panel" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "object" + + def draw(self, context): + layout = self.layout + + obj = context.object + + row = layout.row() + row.label(text="Hello world!", icon='WORLD_DATA') + + row = layout.row() + row.label(text="Active object is: " + obj.name) + row = layout.row() + row.prop(obj, "name") + +bpy.types.register(OBJECT_PT_hello) |