[Bf-extensions-cvs] [09340edc] master: Carver MT: Cleanup, remove redundant tracker_url

lijenstina noreply at git.blender.org
Wed Jul 26 20:43:39 CEST 2017


Commit: 09340edc1348a1c72d5889779efe95f74442832b
Author: lijenstina
Date:   Wed Jul 26 20:42:28 2017 +0200
Branches: master
https://developer.blender.org/rBA09340edc1348a1c72d5889779efe95f74442832b

Carver MT: Cleanup, remove redundant tracker_url

Bumped version to 1.1.7
Pep8 cleanup
Consistent property definitions
import bpy.props as a tuple
Note: still there are some that seems unused variables
those need further looking into before removal

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

M	mesh_carver.py

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

diff --git a/mesh_carver.py b/mesh_carver.py
index 9fbb6eff..aa388a15 100644
--- a/mesh_carver.py
+++ b/mesh_carver.py
@@ -21,12 +21,11 @@ bl_info = {
     "name": "Carver MT",
     "category": "Object",
     "author": "Pixivore, Cedric LEPILLER, Ted Milker",
-    "version": (1, 1, 6),
+    "version": (1, 1, 7),
     "blender": (2, 77, 0),
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
+    "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
                 "Scripts/Modeling/Carver",
-    "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
-    "description": "Multiple tools to carve or to create objects.",
+    "description": "Multiple tools to carve or to create objects",
     }
 
 import bpy
@@ -38,8 +37,17 @@ import sys
 import random
 import bmesh
 import bpy_extras
+from bpy.props import (
+        BoolProperty,
+        EnumProperty,
+        IntProperty,
+        StringProperty,
+        )
 from bpy_extras import view3d_utils
-from bpy_extras.view3d_utils import region_2d_to_vector_3d, region_2d_to_location_3d
+from bpy_extras.view3d_utils import (
+        region_2d_to_vector_3d,
+        region_2d_to_location_3d,
+        )
 
 Profils = [
     ("CTP_4882",
@@ -455,136 +463,136 @@ UNION = 1
 class CarverPrefs(bpy.types.AddonPreferences):
     bl_idname = __name__
 
-    Enable_Tab_01 = bpy.props.BoolProperty(
-        name="Info",
-        description="Some general information and settings about the add-on",
-        default=False
-        )
-    Enable_Tab_02 = bpy.props.BoolProperty(
-        name="Hotkeys",
-        description="List of the shortcuts used during carving",
-        default=False
-        )
-
-    bpy.types.Scene.Key_Create = bpy.props.StringProperty(
-        name="Object creation",
-        description="Object creation",
-        maxlen=1,
-        default="C")
-    bpy.types.Scene.Key_Update = bpy.props.StringProperty(
-        name="Auto Bevel Update",
-        description="Auto Bevel Update",
-        maxlen=1,
-        default="A",
-    )
-    bpy.types.Scene.Key_Bool = bpy.props.StringProperty(
-        name="Boolean type",
-        description="Boolean operation type",
-        maxlen=1,
-        default="T",
-    )
-    bpy.types.Scene.Key_Brush = bpy.props.StringProperty(
-        name="Brush Mode",
-        description="Brush Mode",
-        maxlen=1,
-        default="B",
-    )
-    bpy.types.Scene.Key_Help = bpy.props.StringProperty(
-        name="Help display",
-        description="Help display",
-        maxlen=1,
-        default="H",
-    )
-    bpy.types.Scene.Key_Instant = bpy.props.StringProperty(
-        name="Instantiate",
-        description="Instantiate object",
-        maxlen=1,
-        default="I",
-    )
-    bpy.types.Scene.Key_Close = bpy.props.StringProperty(
-        name="Close polygonal shape",
-        description="Close polygonal shape",
-        maxlen=1,
-        default="X",
-    )
-    bpy.types.Scene.Key_Apply = bpy.props.StringProperty(
-        name="Apply operation",
-        description="Apply operation",
-        maxlen=1,
-        default="Q",
-    )
-    bpy.types.Scene.Key_Scale = bpy.props.StringProperty(
-        name="Scale object",
-        description="Scale object",
-        maxlen=1,
-        default="S",
-    )
-    bpy.types.Scene.Key_Gapy = bpy.props.StringProperty(
-        name="Gap rows",
-        description="Scale gap between columns",
-        maxlen=1,
-        default="J",
-    )
-    bpy.types.Scene.Key_Gapx = bpy.props.StringProperty(
-        name="Gap columns",
-        description="Scale gap between columns",
-        maxlen=1,
-        default="U",
-    )
-    bpy.types.Scene.Key_Depth = bpy.props.StringProperty(
-        name="Depth",
-        description="Cursor depth or solidify pattern",
-        maxlen=1,
-        default="D",
-    )
-    bpy.types.Scene.Key_BrushDepth = bpy.props.StringProperty(
-        name="Brush Depth",
-        description="Brush depth",
-        maxlen=1,
-        default="C",
-    )
-    bpy.types.Scene.Key_Subadd = bpy.props.StringProperty(
-        name="Add subdivision",
-        description="Add subdivision",
-        maxlen=1,
-        default="X",
-    )
-    bpy.types.Scene.Key_Subrem = bpy.props.StringProperty(
-        name="Remove subdivision",
-        description="Remove subdivision",
-        maxlen=1,
-        default="W",
-    )
-    bpy.types.Scene.Key_Randrot = bpy.props.StringProperty(
-        name="Random rotation",
-        description="Random rotation",
-        maxlen=1,
-        default="R",
-    )
-    bpy.types.Scene.Key_Solver = bpy.props.StringProperty(
-        name="Solver",
-        description="Switch between Carve and BMesh Boolean solver\n"
-                    "depending on a specific use case",
-        maxlen=1,
-        default="V",
-    )
-    bpy.types.Scene.ProfilePrefix = bpy.props.StringProperty(
-        name="Profile prefix",
-        description="Prefix to look for profiles with",
-        default="Carver_Profile-"
-    )
-    bpy.types.Scene.CarverSolver = bpy.props.EnumProperty(
-        name="Boolean Solver",
-        description="Boolean solver to use by default\n",
-        default="CARVE",
-        items=(
-            ('CARVE', 'Carve', "Carve solver, as the legacy one, can handle\n"
-                               "basic coplanar but can often fail with\n"
-                               "non-closed geometry"),
-            ('BMESH', 'BMesh', "BMesh solver is faster, but cannot handle\n"
-                               "coplanar and self-intersecting geometry")
-        )
-    )
+    Enable_Tab_01 = BoolProperty(
+            name="Info",
+            description="Some general information and settings about the add-on",
+            default=False
+            )
+    Enable_Tab_02 = BoolProperty(
+            name="Hotkeys",
+            description="List of the shortcuts used during carving",
+            default=False
+            )
+    bpy.types.Scene.Key_Create = StringProperty(
+            name="Object creation",
+            description="Object creation",
+            maxlen=1,
+            default="C"
+            )
+    bpy.types.Scene.Key_Update = StringProperty(
+            name="Auto Bevel Update",
+            description="Auto Bevel Update",
+            maxlen=1,
+            default="A",
+            )
+    bpy.types.Scene.Key_Bool = StringProperty(
+            name="Boolean type",
+            description="Boolean operation type",
+            maxlen=1,
+            default="T",
+            )
+    bpy.types.Scene.Key_Brush = StringProperty(
+            name="Brush Mode",
+            description="Brush Mode",
+            maxlen=1,
+            default="B",
+            )
+    bpy.types.Scene.Key_Help = StringProperty(
+            name="Help display",
+            description="Help display",
+            maxlen=1,
+            default="H",
+            )
+    bpy.types.Scene.Key_Instant = StringProperty(
+            name="Instantiate",
+            description="Instantiate object",
+            maxlen=1,
+            default="I",
+            )
+    bpy.types.Scene.Key_Close = StringProperty(
+            name="Close polygonal shape",
+            description="Close polygonal shape",
+            maxlen=1,
+            default="X",
+            )
+    bpy.types.Scene.Key_Apply = StringProperty(
+            name="Apply operation",
+            description="Apply operation",
+            maxlen=1,
+            default="Q",
+            )
+    bpy.types.Scene.Key_Scale = StringProperty(
+            name="Scale object",
+            description="Scale object",
+            maxlen=1,
+            default="S",
+            )
+    bpy.types.Scene.Key_Gapy = StringProperty(
+            name="Gap rows",
+            description="Scale gap between columns",
+            maxlen=1,
+            default="J",
+            )
+    bpy.types.Scene.Key_Gapx = StringProperty(
+            name="Gap columns",
+            description="Scale gap between columns",
+            maxlen=1,
+            default="U",
+            )
+    bpy.types.Scene.Key_Depth = StringProperty(
+            name="Depth",
+            description="Cursor depth or solidify pattern",
+            maxlen=1,
+            default="D",
+            )
+    bpy.types.Scene.Key_BrushDepth = StringProperty(
+            name="Brush Depth",
+            description="Brush depth",
+            maxlen=1,
+            default="C",
+            )
+    bpy.types.Scene.Key_Subadd = StringProperty(
+            name="Add subdivision",
+            description="Add subdivision",
+            maxlen=1,
+            default="X",
+            )
+    bpy.types.Scene.Key_Subrem = StringProperty(
+            name="Remove subdivision",
+            description="Remove subdivision",
+            maxlen=1,
+            default="W",
+            )
+    bpy.types.Scene.Key_Randrot = StringProperty(
+            name="Random rotation",
+            description="Random rotation",
+            maxlen=1,
+            default="R",
+            )
+    bpy.types.Scene.Key_Solver = StringProperty(
+            name="Solver",
+            description="Switch between Carve and BMesh Boolean solver\n"
+                        "depending on a specific use case",
+            maxlen=1,
+            default="V",
+            )
+    bpy.types.Scene.ProfilePrefix = StringProperty(
+            name="Profile prefix",
+            description="Prefix to look for profiles with",
+            default="Carver_Profile-"
+            )
+    bpy.types.Scene.CarverSolver = EnumProperty(
+            name="Boolean Solver",
+            description="Boolean solver to use by default\n",
+            default="CARVE",
+            items=(
+                ('CARVE', 'Carve', "Carve solver, as the legacy one, can handle\n"
+                                   "basic coplanar but can often fail with\n"
+                                   "non-closed geometry"),
+                ('BMESH', 'BMesh', "BMesh solver is faster, but cannot handle\n"
+                                   "coplanar and self-intersecting geometry")
+                )
+            )
 
     def draw(sel

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list