[Bf-extensions-cvs] [1886f83] master: initial commit ui_wazou_pie_menus.py: T48618

meta-androcto noreply at git.blender.org
Mon Jun 13 05:05:50 CEST 2016


Commit: 1886f83b85c795a62e82d947327e827a47f27af7
Author: meta-androcto
Date:   Mon Jun 13 13:05:18 2016 +1000
Branches: master
https://developer.blender.org/rBAC1886f83b85c795a62e82d947327e827a47f27af7

initial commit ui_wazou_pie_menus.py: T48618

===================================================================

A	ui_wazou_pie_menus.py

===================================================================

diff --git a/ui_wazou_pie_menus.py b/ui_wazou_pie_menus.py
new file mode 100644
index 0000000..842991c
--- /dev/null
+++ b/ui_wazou_pie_menus.py
@@ -0,0 +1,3318 @@
+# -*- coding: utf-8 -*-
+
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+bl_info = {
+    "name": "Wazou_Pie_Menus",
+    "author": "Cédric Lepiller & DavideDozza & Lapineige & Leafar & 0rAngE",
+    "version": (0, 2, 6),
+    "blender": (2, 76, 0),
+    "description": "Custom Pie Menus",
+    "category": "Pie Menu", }
+
+import bpy
+import os
+from bpy.types import Menu, Header
+from bpy.props import IntProperty, FloatProperty, BoolProperty
+import bmesh
+from mathutils import *
+import math
+import rna_keymap_ui
+
+
+class WazouPieMenuPrefs(bpy.types.AddonPreferences):
+    """Creates the tools in a Panel, in the scene context of the properties editor"""
+    bl_idname = __name__
+    bl_options = {'REGISTER'}
+
+    bpy.types.Scene.Enable_Tab_01 = bpy.props.BoolProperty(default=False)
+    bpy.types.Scene.Enable_Tab_03 = bpy.props.BoolProperty(default=False)
+    bpy.types.Scene.Enable_Tab_04 = bpy.props.BoolProperty(default=False)
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.prop(context.scene, "Enable_Tab_01", text="Info", icon="QUESTION")
+        if context.scene.Enable_Tab_01:
+            row = layout.row()
+            layout.label(text="This Addon Need to activate 'Loop Tools' and 'Bsurfaces' in the Addon Tab to work properly.")
+            layout.label(text="You need to install Iceking's Tool And Auto Mirror")
+
+            layout.operator("wm.url_open", text="IceKing's tools").url = "http://www.blenderartists.org/forum/showthread.php?343641-Iceking-s-Tools"
+            layout.operator("wm.url_open", text="Auto Mirror").url = "http://le-terrier-de-lapineige.over-blog.com/2014/07/automirror-mon-add-on-pour-symetriser-vos-objets-rapidement.html"
+
+        layout.prop(context.scene, "Enable_Tab_03", text="Keymap", icon="URL")
+        if context.scene.Enable_Tab_03:
+            # Add the keymap in the prefs
+            col = layout.column()
+            kc = bpy.context.window_manager.keyconfigs.addon
+            for km, kmi in addon_keymaps:
+                km = km.active()
+                col.context_pointer_set("keymap", km)
+                rna_keymap_ui.draw_kmi([], kc, km, kmi, col, 0)
+            else:
+                for km, kmi in addon_keymaps:
+                    col.context_pointer_set("keymap", km)
+                    rna_keymap_ui.draw_kmi([], kc, km, kmi, col, 1)
+
+        layout.prop(context.scene, "Enable_Tab_04", text="URL's", icon="URL")
+        if context.scene.Enable_Tab_04:
+            row = layout.row()
+            row.operator("wm.url_open", text="Pitiwazou.com").url = "http://www.pitiwazou.com/"
+            row.operator("wm.url_open", text="Wazou's Ghitub").url = "https://github.com/pitiwazou/Scripts-Blender"
+            row.operator("wm.url_open", text="BlenderLounge Forum ").url = "http://blenderlounge.fr/forum/"
+
+#####################################
+#      Proportional Edit Object     #
+#####################################
+
+
+class ProportionalEditObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.active"
+    bl_label = "Proportional Edit Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (True):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = False
+
+        elif bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+
+        return {'FINISHED'}
+
+
+class ProportionalSmoothObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.smooth"
+    bl_label = "Proportional Smooth Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SMOOTH'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'SMOOTH':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SMOOTH'
+        return {'FINISHED'}
+
+
+class ProportionalSphereObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.sphere"
+    bl_label = "Proportional Sphere Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SPHERE'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'SPHERE':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SPHERE'
+        return {'FINISHED'}
+
+
+class ProportionalRootObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.root"
+    bl_label = "Proportional Root Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'ROOT'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'ROOT':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'ROOT'
+        return {'FINISHED'}
+
+
+class ProportionalSharpObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.sharp"
+    bl_label = "Proportional Sharp Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SHARP'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'SHARP':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'SHARP'
+        return {'FINISHED'}
+
+
+class ProportionalLinearObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.linear"
+    bl_label = "Proportional Linear Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'LINEAR'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'LINEAR':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'LINEAR'
+        return {'FINISHED'}
+
+
+class ProportionalConstantObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.constant"
+    bl_label = "Proportional Constant Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'CONSTANT'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'CONSTANT':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'CONSTANT'
+        return {'FINISHED'}
+
+
+class ProportionalRandomObj(bpy.types.Operator):
+    bl_idname = "proportional_obj.random"
+    bl_label = "Proportional Random Object"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+        if bpy.context.scene.tool_settings.use_proportional_edit_objects == (False):
+            bpy.context.scene.tool_settings.use_proportional_edit_objects = True
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'RANDOM'
+
+        if bpy.context.scene.tool_settings.proportional_edit_falloff != 'RANDOM':
+            bpy.context.scene.tool_settings.proportional_edit_falloff = 'RANDOM'
+        return {'FINISHED'}
+
+#######################################
+#     Proportional Edit Edit Mode     #
+#######################################
+
+
+class ProportionalEditEdt(bpy.types.Operator):
+    bl_idname = "proportional_edt.active"
+    bl_label = "Proportional Edit EditMode"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        layout = self.layout
+
+        if bpy.context.scene.tool_settings.proportional_edit != ('DISABLED'):
+            bpy.context.scene.tool_settings.proportional_edit = 'DISABLED'
+        elif bpy.context.scene.tool_settings.proportional_edit != ('ENABLED'):
+            bpy.context.scene.tool_settings.proportional_edit = 'ENABLED'
+        return {'FINISHED'}
+
+
+class ProportionalConnectedEdt(bpy.types.Operator):
+    bl_idname = "proportional_edt.connected"
+    bl_label = "Proportional Connected EditMode"
+    bl_options = {

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list