Guest User

cycleselectionmode.py

a guest
Oct 12th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.98 KB | None | 0 0
  1. bl_info = {
  2.     "name": "Cyclic selection mode",
  3.     "author": "Zuorion",
  4.     "version": (0, 1, 666),
  5.     "blender": (2, 7, 9, 5),
  6.     "location": "",
  7.     "description": "Cyclice through edit selection modes",
  8.     "warning": "",
  9.     "wiki_url": "",
  10.     "tracker_url": "",
  11.     "category": "Mesh"}
  12.    
  13. import bpy
  14.    
  15. class Cycleselectionmode(bpy.types.Operator):
  16.     bl_idname = "mesh.cycle_selection_mode"
  17.     bl_label = "Cycles Selection modes"
  18.     bl_options = {'REGISTER', 'UNDO'}
  19.    
  20.     def invoke(self, context, event):
  21.         curselection = bpy.context.scene.tool_settings.mesh_select_mode
  22.        
  23.         bpy.context.tool_settings.mesh_select_mode = (curselection[2], curselection[0], curselection[1])
  24.         return {'FINISHED'}
  25.  
  26.  
  27. addon_keymaps = []
  28.        
  29. def register():
  30.     bpy.utils.register_class(Cycleselectionmode)
  31.    
  32. def unregister():  
  33.     bpy.utils.unregister_class(Cycleselectionmode)
  34.    
  35. if __name__ == "__main__":
  36.     register()
Add Comment
Please, Sign In to add comment