This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
blender:python:addonnotes:start [2022/02/15 22:00] dwheele |
blender:python:addonnotes:start [2022/02/19 18:19] (current) dwheele [Blender Python Addon Notes] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Blender Python Addon Notes ====== | ====== Blender Python Addon Notes ====== | ||
| * [[..start|Full Blender Python notes]] | * [[..start|Full Blender Python notes]] | ||
| + | * [[https:// | ||
| Doing research to make a panel to control Baking Texture assignments. | Doing research to make a panel to control Baking Texture assignments. | ||
| Line 119: | Line 120: | ||
| mesh.from_pydata(verts, | mesh.from_pydata(verts, | ||
| </ | </ | ||
| + | |||
| + | ===== Blender member variables ===== | ||
| + | |||
| + | ^BL Variable^Example^Description^ | ||
| + | |bl_context|uv|The context in which the panel belongs to| | ||
| + | |bl_idname|VIEW3D_PT_test_1|Name of the object. Unique identifier for buttons and menu items to reference.. If this is set, the panel gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is “OBJECT_PT_hello”, | ||
| + | |bl_label|Panel One|Display name in the interface. Name of the object, shows up in a menu. The panel label, shows up in the panel header at the right of the triangle used to collapse the panel| | ||
| + | |bl_space_type|VIEW_3D|The space the panel will be used in. enum in [‘EMPTY’, | ||
| + | |bl_region_type|UI|The region where the panel is going to be used in. enum in [‘WINDOW’, | ||
| + | |bl_category|Tool|The category (tab) in which the panel will be displayed, when applicable. Leave blank if panel doesn' | ||
| + | |bl_options|DEFAULT_CLOSED|One of DEFAULT_CLOSED, | ||
| + | |bl_region_type|WINDOW|enum in [‘WINDOW’, | ||
| + | |||
| ===== register, unregister ===== | ===== register, unregister ===== | ||
| Line 137: | Line 151: | ||
| but when run **from the Blender Python text editor**, the class doesn' | but when run **from the Blender Python text editor**, the class doesn' | ||
| + | |||
| + | Note that " | ||
| <code python> | <code python> | ||
| Line 147: | Line 163: | ||
| ^Variable^Description^ | ^Variable^Description^ | ||
| - | |__name__|Contains " | + | |< |
| So we include this at the end of a Python script so that when running inside of Blender, it registers this class. Otherwise it doesn' | So we include this at the end of a Python script so that when running inside of Blender, it registers this class. Otherwise it doesn' | ||