diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-24 13:56:26 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-24 13:56:26 +0300 |
commit | 07c61e93893c69c3d2d9e94dbf02120e198f4140 (patch) | |
tree | 6d7bdecd07133b61aa6ac6d6bb6937c1e03c6761 /release/scripts | |
parent | 77faefb45358cf19389d5da3d7bb3ef7894af235 (diff) |
Fix T43743 R key not working after recent rake/random source
refactoring.
Use a new menu instead of old enum key.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 89797b9d236..10e7d89cf68 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -911,6 +911,41 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu): layout.operator("paint.vert_select_ungrouped", text="Ungrouped Verts") + +class VIEW3D_MT_angle_control(Menu): + bl_label = "Angle Control" + + @classmethod + def poll(cls, context): + settings = UnifiedPaintPanel.paint_settings(context) + if not settings: + return False + + brush = settings.brush + tex_slot = brush.texture_slot + + return tex_slot.has_texture_angle and tex_slot.has_texture_angle_source + + def draw(self, context): + layout = self.layout + + settings = UnifiedPaintPanel.paint_settings(context) + brush = settings.brush + + sculpt = (context.sculpt_object != None) + + tex_slot = brush.texture_slot + + layout.prop(tex_slot, "use_rake", text="Rake") + + if brush.brush_capabilities.has_random_texture_angle and tex_slot.has_random_texture_angle: + if sculpt: + if brush.sculpt_capabilities.has_random_texture_angle: + layout.prop(tex_slot, "use_random", text="Random") + else: + layout.prop(tex_slot, "use_random", text="Random") + + # ********** Add menu ********** # XXX: INFO_MT_ names used to keep backwards compatibility (Addons etc that hook into the menu) |