Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- class MainPanelv2(bpy.types.Panel):
- bl_label = "Object Adder"
- bl_idname = "PT_MainPanel"
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'UI'
- bl_category = 'Object Adder'
- def draw(self, context):
- layout = self.layout
- row = layout.row()
- row = layout.row()
- row.operator("mesh.primitive_cube_add")
- row = layout.row()
- row = layout.row()
- row.operator("mesh.primitive_cylinder_add")
- row = layout.row()
- row = layout.row()
- row.operator("mesh.primitive_uv_sphere_add")
- row = layout.row()
- row = layout.row()
- #This Operation will add the Selections to your Panel
- row.operator_enum("mesh.select_mode", "type")
- def register():
- bpy.utils.register_class(MainPanel)
- def unregister():
- bpy.utils.unregister_class(MainPanel)
- if __name__ == "__main__":
- register()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement