help with extrude code

is it possible to limit the extrusion length or distance when doing the extrude to 3d cursor function using code? if so please post possible code work around. i’m working on a retopology helper addon, and this will be added in its list of commands.

do you mean a restriction during a modal extrusion operation?

when you extrude right, or “extrude to cursor” it will extrude that edge with the direction and length relative to the cursor, i want to control the length with a user input value.

In a regular extrusion, just type a number, or tweak the values in the redo panel afterwards.

Extrude to Cursor can’t be controlled this way, you would need to re-create the main functionality in python (project mouse coordinates to 3d and extrude to that point, which may additionally require a calculation of the angle / direction)

thanks for the time, man. :), i’ll probably make a hackish version in the end.