Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-04-20 01:37:01 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-04-20 01:37:36 +0300
commit16c87dcfb5a79d64abae31c5a8371d87c0ae6321 (patch)
tree2b8ba4b0d00679c9f993e31a94e02a19661443ae /mesh_snap_utilities_line/preferences.py
parent84367c7d8e1c62386aa1940426be7fbde13f0cc0 (diff)
Cleanup: formatting using autopep8
Diffstat (limited to 'mesh_snap_utilities_line/preferences.py')
-rw-r--r--mesh_snap_utilities_line/preferences.py191
1 files changed, 97 insertions, 94 deletions
diff --git a/mesh_snap_utilities_line/preferences.py b/mesh_snap_utilities_line/preferences.py
index 2336de90..3552ca95 100644
--- a/mesh_snap_utilities_line/preferences.py
+++ b/mesh_snap_utilities_line/preferences.py
@@ -9,7 +9,7 @@ from bpy.props import (
IntProperty,
FloatVectorProperty,
FloatProperty,
- )
+)
from bpy.app.translations import contexts as i18n_contexts
@@ -21,94 +21,94 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences):
# when defining this in a submodule of a python package.
bl_idname = __package__
- intersect : BoolProperty(name="Intersect",
- description="intersects created line with the existing edges, even if the lines do not intersect",
- default=True)
-
- create_face : BoolProperty(name="Create faces",
- description="Create faces defined by enclosed edges",
- default=False)
-
- outer_verts : BoolProperty(name="Snap to outer vertices",
- description="The vertices of the objects are not activated also snapped",
- default=True)
-
- increments_grid : BoolProperty(name="Increments of Grid",
- description="Snap to increments of grid",
- default=False)
-
- auto_constrain : BoolProperty(name="Automatic Constraint",
- description="Detects a direction to constrain depending on the position of the mouse",
- default=False)
-
- incremental : FloatProperty(name="Incremental",
- description="Snap in defined increments",
- default=0,
- min=0,
- step=1,
- precision=3)
-
- relative_scale : FloatProperty(name="Relative Scale",
- description="Value that divides the global scale",
- default=1,
- min=0,
- step=1,
- precision=3)
-
- out_color : FloatVectorProperty(name="Floor",
- default=(0.0, 0.0, 0.0, 0.5),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- face_color : FloatVectorProperty(name="Face Highlighted",
- default=(1.0, 0.8, 0.0, 0.5),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- edge_color : FloatVectorProperty(name="Edge Highlighted",
- default=(0.0, 0.8, 1.0, 0.5),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- vert_color : FloatVectorProperty(name="Vertex Highlighted",
- default=(1.0, 0.5, 0.0, 0.5),
- size=4, subtype="COLOR",
- min=0,
- max=1)
-
- center_color : FloatVectorProperty(name="Middle of the Edge",
- default=(1.0, 0.0, 1.0, 1.0),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- perpendicular_color : FloatVectorProperty(name="Perpendicular Point",
- default=(0.1, 0.5, 0.5, 1.0),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- constrain_shift_color : FloatVectorProperty(name="Shift Constrain",
- default=(0.8, 0.5, 0.4, 1.0),
- size=4,
- subtype="COLOR",
- min=0,
- max=1)
-
- tabs : EnumProperty(name="Tabs",
- items = [("GENERAL", "General", ""),
- ("KEYMAPS", "Keymaps", ""),
- ("COLORS", "Colors", ""),
- ("HELP", "Links", ""),],
- default="GENERAL")
+ intersect: BoolProperty(name="Intersect",
+ description="intersects created line with the existing edges, even if the lines do not intersect",
+ default=True)
+
+ create_face: BoolProperty(name="Create faces",
+ description="Create faces defined by enclosed edges",
+ default=False)
+
+ outer_verts: BoolProperty(name="Snap to outer vertices",
+ description="The vertices of the objects are not activated also snapped",
+ default=True)
+
+ increments_grid: BoolProperty(name="Increments of Grid",
+ description="Snap to increments of grid",
+ default=False)
+
+ auto_constrain: BoolProperty(name="Automatic Constraint",
+ description="Detects a direction to constrain depending on the position of the mouse",
+ default=False)
+
+ incremental: FloatProperty(name="Incremental",
+ description="Snap in defined increments",
+ default=0,
+ min=0,
+ step=1,
+ precision=3)
+
+ relative_scale: FloatProperty(name="Relative Scale",
+ description="Value that divides the global scale",
+ default=1,
+ min=0,
+ step=1,
+ precision=3)
+
+ out_color: FloatVectorProperty(name="Floor",
+ default=(0.0, 0.0, 0.0, 0.5),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ face_color: FloatVectorProperty(name="Face Highlighted",
+ default=(1.0, 0.8, 0.0, 0.5),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ edge_color: FloatVectorProperty(name="Edge Highlighted",
+ default=(0.0, 0.8, 1.0, 0.5),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ vert_color: FloatVectorProperty(name="Vertex Highlighted",
+ default=(1.0, 0.5, 0.0, 0.5),
+ size=4, subtype="COLOR",
+ min=0,
+ max=1)
+
+ center_color: FloatVectorProperty(name="Middle of the Edge",
+ default=(1.0, 0.0, 1.0, 1.0),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ perpendicular_color: FloatVectorProperty(name="Perpendicular Point",
+ default=(0.1, 0.5, 0.5, 1.0),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ constrain_shift_color: FloatVectorProperty(name="Shift Constrain",
+ default=(0.8, 0.5, 0.4, 1.0),
+ size=4,
+ subtype="COLOR",
+ min=0,
+ max=1)
+
+ tabs: EnumProperty(name="Tabs",
+ items=[("GENERAL", "General", ""),
+ ("KEYMAPS", "Keymaps", ""),
+ ("COLORS", "Colors", ""),
+ ("HELP", "Links", ""), ],
+ default="GENERAL")
def draw(self, context):
layout = self.layout
@@ -152,7 +152,8 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences):
def draw_snap_utilities_colors(self, layout):
layout.use_property_split = True
- flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+ flow = layout.grid_flow(
+ row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(self, "out_color")
flow.prop(self, "constrain_shift_color")
@@ -165,9 +166,10 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences):
def draw_snap_utilities_help(self, layout):
#layout.operator("wm.url_open", text="Gumroad Page", icon='HELP',).url = "https://gum.co/IaqQf"
#layout.operator("wm.url_open", text="Blender Market Page", icon='HELP',).url = "https://blendermarket.com/products/snap-utilities"
- layout.operator("wm.url_open", text="Wiki", icon='HELP',).url = "https://github.com/Mano-Wii/Addon-Snap-Utilities-Line/wiki"
- layout.operator("wm.url_open", text="Forum", icon='HELP',).url = "https://blenderartists.org/t/cad-snap-utilities"
-
+ layout.operator("wm.url_open", text="Wiki", icon='HELP',
+ ).url = "https://github.com/Mano-Wii/Addon-Snap-Utilities-Line/wiki"
+ layout.operator("wm.url_open", text="Forum", icon='HELP',
+ ).url = "https://blenderartists.org/t/cad-snap-utilities"
def draw_snap_utilities_keymaps(self, context, layout):
from .keys import (
@@ -206,4 +208,5 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences):
for kmi in km.keymap_items:
if "snap_utilities" in kmi.idname:
- rna_keymap_ui.draw_kmi(["ADDON", "USER", "DEFAULT"], kc, km, kmi, col, 0)
+ rna_keymap_ui.draw_kmi(
+ ["ADDON", "USER", "DEFAULT"], kc, km, kmi, col, 0)