System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.92
Blender Version
Broken: version: 2.93.1, branch: master, commit date: 2021-06-22 05:57, hash: rB1b8d33b18c2f
Worked: it Failed in 2.83 too
Short description of error
The snap_cursor_to_selected works with the shortcut but Fails in Python with an Error Message:
RuntimeError: Operator bpy.ops.view3d.snap_cursor_to_selected.poll() failed, context is incorrect Error: Python script failed, check the message in the system console
Exact steps for others to reproduce the error
- open the Blend File
- Select the cube
- Run the Script
import bpy bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='SELECT') bpy.ops.view3d.snap_cursor_to_selected()