📋 Metadata

💬 Content

Jakro:

the viewport doesn’t update when I switch between vert,edge,face via a mode selector

Hmm, looks like it’s a Blender issue.
You can update the viewport manually by using PME’s tag_redraw() or tag_redraw(area='VIEW_3D', region='WINDOW') function:

bpy.ops.object.mode_set(mode='EDIT'); bpy.ops.wm.context_set_value(data_path="tool_settings.mesh_select_mode", value= "(False, False, True)"); tag_redraw(area='VIEW_3D', region='WINDOW')

Btw, you can use this code instead:

bpy.ops.object.mode_set(mode='EDIT'); C.tool_settings.mesh_select_mode = (False, False, True); tag_redraw(area='VIEW_3D', region='WINDOW')

❤️ 3 likes


🔗 View on Blender Artists