Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
graphic:python:blender [2024/01/24 10:02] – [Blender variable naming standards] ying | graphic:python:blender [2024/01/31 07:41] – [Blender variable naming standards] ying | ||
---|---|---|---|
Line 393: | Line 393: | ||
ref: | ref: | ||
* https:// | * https:// | ||
+ | * https:// | ||
* https:// | * https:// | ||
+ | * https:// | ||
* **Class name convention**: | * **Class name convention**: | ||
Line 421: | Line 423: | ||
* class ClassName() | * class ClassName() | ||
+ | Example of class name, balancing between Python PEP | ||
+ | * example addon, <code python> | ||
+ | class BUILDMAKER_OT_CreateAsset(bpy.types.Operator): | ||
+ | bl_idname = " | ||
+ | | ||
+ | class CreateAsset(bpy.types.Operator): | ||
+ | bl_idname = " | ||
+ | |||
+ | class BUILDMAKER_OT_createAsset(bpy.types.Operator): | ||
+ | |||
+ | # 2.8x onwards, property | ||
+ | class MyOperator(bpy.types.Operator): | ||
+ | value: IntProperty() | ||
+ | |||
+ | </ | ||
===== common blender api commands ===== | ===== common blender api commands ===== | ||
Line 540: | Line 557: | ||
**UI** | **UI** | ||
* bpy.types.Panel | * bpy.types.Panel | ||
+ | * the panel display order is determined by the order bpy.utils.register_class processes | ||
* bpy.types.UIList | * bpy.types.UIList | ||
* bpy.types.Operator | * bpy.types.Operator |