*
@1conscience0dimension
* yeah that's ok if I want to select everything, my code cycles the options first then selects (True,True,True)
cur = [bpy.context.tool_settings.mesh_select_mode[0], bpy.context.tool_settings.mesh_select_mode[1], bpy.context.tool_settings.mesh_select_mode[2]]
bpy.context.tool_settings.mesh_select_mode = pos[(pos.index(cur)+1)%len(pos)]
1
1COD
*
@OnlineRender
* sry my bad. I considered that pressing 1234 was toggling. but there is a problem with this. because you can select several mode with shift like vertex and edge and than error. I did a toggle like this in a menu autosmooth menu (to have only one button) but in fact I don't have an error because the else is taking other situations in consideration. it was from a code I found on a forum...
3 Comments
good share. just for info you can reduce your exe to a simple line:
* @1conscience0dimension * yeah that's ok if I want to select everything, my code cycles the options first then selects (True,True,True)
* @OnlineRender * sry my bad. I considered that pressing 1234 was toggling. but there is a problem with this. because you can select several mode with shift like vertex and edge and than error. I did a toggle like this in a menu autosmooth menu (to have only one button) but in fact I don't have an error because the else is taking other situations in consideration. it was from a code I found on a forum...
(in fact the 'EXEC_DEFAULT' is not needed this is the option by default)