2011-02-18 09:47:37 +01:00
|
|
|
"""
|
|
|
|
Basic Panel Example
|
|
|
|
+++++++++++++++++++
|
2015-09-08 06:30:05 +02:00
|
|
|
|
2011-02-18 09:47:37 +01: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)
|