Fix #49740: Reset Stencil Transform occasionally doesn't work

Prior to this commit, if the "Texture Mask" stencil was reset, this
would call the `brush.stencil_reset_transform` operator with the `mask`
parameter set to `True`. Subsequent clicks, even on the "Texture"
stencil "Reset Transform" button would still pass `True` to the
underlying C++ API, even though the `mask` property was left
uninitialized.

This commit sets the parameter to False explicitly to fix this bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/132001
This commit is contained in:
Sean Kim
2024-12-17 17:51:08 +01:00
committed by Sean Kim
parent da88fc87fd
commit a8f1b4c462

View File

@@ -1404,8 +1404,8 @@ def brush_texture_settings(layout, brush, sculpt):
if tex_slot.map_mode == 'STENCIL':
if brush.texture and brush.texture.type == 'IMAGE':
layout.operator("brush.stencil_fit_image_aspect")
layout.operator("brush.stencil_reset_transform")
layout.operator("brush.stencil_fit_image_aspect").mask = False
layout.operator("brush.stencil_reset_transform").mask = False
# angle and texture_angle_source
if tex_slot.has_texture_angle: