diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-30 14:32:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-30 14:32:02 +0400 |
commit | 3b04b861bd964a54ee88defe899978ae564cb037 (patch) | |
tree | 1b30114cefe34686bb870f97eced701c96b381b9 /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | 9461af89f1da9d4d1f4eef952084bbc7711376d7 (diff) |
Fix another part of #35141: there was no way to reset the stencil transform after e.g.
scaling it along one axis, now there's a Reset Transform button.
The Image Aspect button is now also hidden unless the texture is an image texture.
And also hide the color wheel for painting tools that don't use colors.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 56b82655e47..1b6356f0dba 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -84,7 +84,9 @@ def brush_texture_settings(layout, brush, sculpt): layout.separator() if tex_slot.map_mode == 'STENCIL': - layout.operator("brush.stencil_fit_image_aspect") + if brush.texture and brush.texture.type == 'IMAGE': + layout.operator("brush.stencil_fit_image_aspect") + layout.operator("brush.stencil_reset_transform") # angle and texture_angle_source col = layout.column() @@ -127,7 +129,9 @@ def brush_mask_texture_settings(layout, brush): layout.separator() if mask_tex_slot.map_mode == 'STENCIL': - layout.operator("brush.stencil_fit_image_aspect").mask = True + if brush.mask_texture and brush.mask_texture.type == 'IMAGE': + layout.operator("brush.stencil_fit_image_aspect").mask = True + layout.operator("brush.stencil_reset_transform") if brush.mask_texture: layout.label(text="Mask Mapping:") |