I just want to get the pivot location of the 3d model!
I tried to set the cursor to pivot position and print the cursor location
import bpy
bpy.ops.view3d.snap_cursor_to_selected()
print(bpy.context.scene.cursor.location)
I had this error:
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
