bl_space_type:面板所在的编辑器类型,现在这个面板在3D视图编辑器中 bl_region_type:面板所在的区域类型 bl_category:面板所属的选项卡名称 class SimplePanel(bpy.types.Panel): bl_label = "Simple Panel" bl_idname = "OBJECT_PT_simple_panel" bl_space_type = "VIEW_3D" bl_region_type = "UI" bl...
importbpyclassView3DPanel(bpy.types.Panel):bl_space_type='VIEW_3D'bl_region_type='UI'bl_category="Test"bl_idname="VIEW3D_PT_test_1"bl_label="bl_label"bpy.types.Scene.float_test=bpy.props.FloatProperty()bpy.types.Scene.bool_test=bpy.props.BoolProperty()bpy.types.Scene.string_test=bpy...
class SymmetryFixPanel(bpy.types.Panel): bl_label = "Symmetry Fix" bl_idname = "OBJECT_PT_symmetry_fix" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_category = 'Symmetry Fix Panel' def draw(self, context): layout = self.layout layout.prop(context.scene, 'epsilon') layout....
bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "object" bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "obje...
bl_idname="OBJ_PT_UIMain"bl_label="MoMoCV.Show"bl_space_type='VIEW_3D'bl_region_type='UI'bl_category="MoMoCV" 就是说,标签是由category决定的,这个UI的分类是由MoMoCV.Show决定的。 #UIOn MoMoCVclassOBJ_UIMain(bpy.types.Panel):bl_idname="OBJ_PT_UIMain"bl_label="MoMoCV.Show"bl_spa...
bl_idname = "PANEL_new"#面板所在位置 bl_space_type = 'VIEW_3D'bl_region_type = 'UI'bl_category = "案例面板在这"def draw(self, context):layout = self.layout #第一行 row = layout.row()row.label(text="我是标签")#第二行 row.operator("mesh.primitive_twisted_torus_add")def ...
bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_category = "模型规范工具" def draw(self, context): layout = self.layout row = layout.row() row.operator("object.align_selected_to_horizontal", text="选中项作为局部水平面")
bl_space_type :str# 必填,表示该面板的区块类型。bl_region_type :str# 必填,表示面板标题。bl_label :str# 可选,表明显示在所处界面的哪个二级分类下。bl_category :str# 必填,用于编写绘制界面的代码。defdraw(self,context) ->None PropertyGroup...
bl-space-type Options | `EMPTY` | `NLA_EDITOR` | `NODE_EDITOR` | `INFO` | | `VIEW_3D` | `IMAGE_EDITOR` | `LOGIC_EDITOR` | `FILE_BROWSER` | | `TIMELINE` | `SEQUENCE_EDITOR` | `PROPERTIES` | `CONSOLE` | | `GRAPH_EDITOR` | `CLIP_EDITOR` | `OUTLINER` | | | `DOPESHEET...
box() 定义有外框的竖向子布局 menu_pie() 饼状菜单 operator() 放置调用操作器的按钮 prop() 展示RNA,并把它放在布局中 label() 显示标签 separator() 分隔元素 代码示例 classSimplePanel(bpy.types.Panel): bl_space_type ='VIEW_3D'bl_region_type ="TOOLS"bl_category ="Test"bl_label ="测试工具...