SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bl_info = {
  2.     "name": "Face Menu 2",
  3.     "author": "",
  4.     "version": (1, 0),
  5.     "blender": (2, 80, 0),
  6.     "location": "View3D > Header > Face",
  7.     "description": "",
  8.     "warning": "",
  9.     "wiki_url": "",
  10.     "category": "UI",
  11. }
  12. import bpy
  13. from bpy.types import Menu
  14.  
  15.  
  16. class VIEW3D_MT_edit_mesh_faces(Menu):
  17.     bl_label = "Face"
  18.     bl_idname = "VIEW3D_MT_edit_mesh_faces"
  19.  
  20.     def draw(self, _context):
  21.         layout = self.layout
  22.  
  23.         layout.operator_context = 'INVOKE_REGION_WIN'
  24.  
  25.         layout.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Faces")
  26.         layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten", text="Extrude Faces Along Normals")
  27.         layout.operator("mesh.extrude_faces_move", text="Extrude Individual Faces")
  28.  
  29.         layout.separator()
  30.        
  31.         # Your code:
  32.         row = layout.row()
  33.         row.scale_y = 3.0
  34.         row.operator("render.render")
  35.         #
  36.        
  37.         layout.operator("mesh.inset")
  38.         layout.operator("mesh.poke")
  39.         props = layout.operator("mesh.quads_convert_to_tris")
  40.         props.quad_method = props.ngon_method = 'BEAUTY'
  41.         layout.operator("mesh.tris_convert_to_quads")
  42.         layout.operator("mesh.solidify", text="Solidify Faces")
  43.         layout.operator("mesh.wireframe")
  44.        
  45.         layout.separator()
  46.  
  47.         layout.operator("mesh.fill")
  48.         layout.operator("mesh.fill_grid")
  49.         layout.operator("mesh.beautify_fill")
  50.  
  51.         layout.separator()
  52.  
  53.         layout.operator("mesh.intersect")
  54.         layout.operator("mesh.intersect_boolean")
  55.  
  56.         layout.separator()
  57.  
  58.         layout.operator("mesh.face_split_by_edges")
  59.  
  60.         layout.separator()
  61.  
  62.         layout.operator("mesh.faces_shade_smooth")
  63.         layout.operator("mesh.faces_shade_flat")
  64.  
  65.         layout.separator()
  66.  
  67.         layout.menu("VIEW3D_MT_edit_mesh_faces_data")
  68.  
  69. def register():
  70.     from bpy.utils import register_class
  71.     register_class(VIEW3D_MT_edit_mesh_faces)
  72.    
  73. if __name__ == "__main__":
  74.     register()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top