Hello I wrote such a script who should find the nearest point from 3d cursor “” def execute(self, context):
cursor = bpy.context.scene.cursor
obj = bpy.context.active_object
but I have such a error "Object.closest_point_on_mesh<>: error with argument 1, “origin” - sequence expected at dimension 1, not ‘View3DCursor’
Maybe someone know, what is wrong in this code ?
I will be very grateful for help
Greets
Of course I’m not registering a class, and script is running.
But if I do anything in the code, nothing changes after run script. I can delete the whole class and after run script nothing changes. The button, as it was, still is.
I have no idea what’s going on.
You can’t inherit from the cursor. Use bpy.types.Operator instead.
The cursor and 90% other classes exist only to expose some properties from C. They are otherwise internal.
So, you’ll need to subclass operators, then make sure it’s registered afterwards.