JannisX11 / blockbench

Blockbench - A low poly 3D model editor
https://www.blockbench.net
GNU General Public License v3.0
3.05k stars 271 forks source link

Reference error in onStrokeEnd usage #2379

Open jasonjgardner opened 2 weeks ago

jasonjgardner commented 2 weeks ago

What are you trying to do, and what do you expect to happen?

Attempting to use onStrokeEnd() in my plugin's brush tool. I expect the method to be called after ending a brush stroke when the plugin's brush tool is selected.

What happens instead?

The BrushOptions.onStrokeEnd method is not called on selected brush tools. In Painter.stopPaintTool, a ReferenceError is thrown at painter.js:267 because the variables x, y, uv, event, and data are not in the current scope.

ReferenceError

Model format in which the issue occurs

Any format

Blockbench variant

Program

Blockbench version

4.10.3

Operating System

Windows 11

Installed Blockbench plugins

PBR Preview