tornavis/doc/python_api/examples/bpy.types.Panel.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
635 B
Python
Raw Normal View History

"""
Basic Panel Example
+++++++++++++++++++
2015-09-08 06:30:05 +02:00
This script is a simple panel which will draw into the object properties
section.
Notice the 'CATEGORY_PT_name' :class:`Panel.bl_idname`, this is a naming
convention for panels.
.. note::
Panel subclasses must be registered for blender to use them.
"""
import bpy
class HelloWorldPanel(bpy.types.Panel):
bl_idname = "OBJECT_PT_hello_world"
bl_label = "Hello World"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
def draw(self, context):
self.layout.label(text="Hello World")
2011-02-18 20:33:19 +01:00
bpy.utils.register_class(HelloWorldPanel)