From 07c61e93893c69c3d2d9e94dbf02120e198f4140 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Tue, 24 Feb 2015 11:56:26 +0100 Subject: Fix T43743 R key not working after recent rake/random source refactoring. Use a new menu instead of old enum key. --- release/scripts/startup/bl_ui/space_view3d.py | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'release/scripts/startup') 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) -- cgit v1.2.3