[Bf-extensions-cvs] [1da60d32] master: Cleanup: object_fracture_cell indentation

Campbell Barton noreply at git.blender.org
Mon May 4 06:18:02 CEST 2020


Commit: 1da60d3226e1c722fca59197557178be2cebd93f
Author: Campbell Barton
Date:   Mon May 4 14:17:32 2020 +1000
Branches: master
https://developer.blender.org/rBA1da60d3226e1c722fca59197557178be2cebd93f

Cleanup: object_fracture_cell indentation

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

M	object_fracture_cell/__init__.py

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

diff --git a/object_fracture_cell/__init__.py b/object_fracture_cell/__init__.py
index 2e6d3b08..e5e56c26 100644
--- a/object_fracture_cell/__init__.py
+++ b/object_fracture_cell/__init__.py
@@ -35,13 +35,13 @@ bl_info = {
 
 import bpy
 from bpy.props import (
-        StringProperty,
-        BoolProperty,
-        IntProperty,
-        FloatProperty,
-        FloatVectorProperty,
-        EnumProperty,
-        )
+    StringProperty,
+    BoolProperty,
+    IntProperty,
+    FloatProperty,
+    FloatVectorProperty,
+    EnumProperty,
+)
 
 from bpy.types import Operator
 
@@ -80,18 +80,22 @@ def main_object(context, obj, level, **kw):
         obj.display_type = 'WIRE'
 
     objects = fracture_cell_setup.cell_fracture_objects(context, obj, **kw_copy)
-    objects = fracture_cell_setup.cell_fracture_boolean(context, obj, objects,
-                                                        use_island_split=use_island_split,
-                                                        use_interior_hide=(use_interior_vgroup or use_sharp_edges),
-                                                        use_debug_bool=use_debug_bool,
-                                                        use_debug_redraw=kw_copy["use_debug_redraw"],
-                                                        level=level,
-                                                        )
+    objects = fracture_cell_setup.cell_fracture_boolean(
+        context, obj, objects,
+        use_island_split=use_island_split,
+        use_interior_hide=(use_interior_vgroup or use_sharp_edges),
+        use_debug_bool=use_debug_bool,
+        use_debug_redraw=kw_copy["use_debug_redraw"],
+        level=level,
+    )
 
     # must apply after boolean.
     if use_recenter:
-        bpy.ops.object.origin_set({"selected_editable_objects": objects},
-                                  type='ORIGIN_GEOMETRY', center='MEDIAN')
+        bpy.ops.object.origin_set(
+            {"selected_editable_objects": objects},
+            type='ORIGIN_GEOMETRY',
+            center='MEDIAN',
+        )
 
     #----------
     # Recursion
@@ -105,9 +109,10 @@ def main_object(context, obj, level, **kw):
                 if recursion_chance_select == 'RANDOM':
                     random.shuffle(objects_recurse_input)
                 elif recursion_chance_select in {'SIZE_MIN', 'SIZE_MAX'}:
-                    objects_recurse_input.sort(key=lambda ob_pair:
-                        (Vector(ob_pair[1].bound_box[0]) -
-                         Vector(ob_pair[1].bound_box[6])).length_squared)
+                    objects_recurse_input.sort(key=lambda ob_pair: (
+                        Vector(ob_pair[1].bound_box[0]) -
+                        Vector(ob_pair[1].bound_box[6])
+                    ).length_squared)
                     if recursion_chance_select == 'SIZE_MAX':
                         objects_recurse_input.reverse()
                 elif recursion_chance_select in {'CURSOR_MIN', 'CURSOR_MAX'}:
@@ -142,11 +147,12 @@ def main_object(context, obj, level, **kw):
     if level == 0:
         # import pdb; pdb.set_trace()
         if use_interior_vgroup or use_sharp_edges:
-            fracture_cell_setup.cell_fracture_interior_handle(objects,
-                                                              use_interior_vgroup=use_interior_vgroup,
-                                                              use_sharp_edges=use_sharp_edges,
-                                                              use_sharp_edges_apply=use_sharp_edges_apply,
-                                                              )
+            fracture_cell_setup.cell_fracture_interior_handle(
+                objects,
+                use_interior_vgroup=use_interior_vgroup,
+                use_sharp_edges=use_sharp_edges,
+                use_sharp_edges_apply=use_sharp_edges_apply,
+            )
 
     #--------------
     # Scene Options
@@ -247,168 +253,178 @@ class FractureCell(Operator):
     # -------------------------------------------------------------------------
     # Source Options
     source: EnumProperty(
-            name="Source",
-            items=(('VERT_OWN', "Own Verts", "Use own vertices"),
-                   ('VERT_CHILD', "Child Verts", "Use child object vertices"),
-                   ('PARTICLE_OWN', "Own Particles", ("All particle systems of the "
-                                                      "source object")),
-                   ('PARTICLE_CHILD', "Child Particles", ("All particle systems of the "
-                                                          "child objects")),
-                   ('PENCIL', "Annotation Pencil", "Annotation Grease Pencil."),
-                   ),
-            options={'ENUM_FLAG'},
-            default={'PARTICLE_OWN'},
-            )
+        name="Source",
+        items=(
+            ('VERT_OWN', "Own Verts", "Use own vertices"),
+            ('VERT_CHILD', "Child Verts", "Use child object vertices"),
+            ('PARTICLE_OWN', "Own Particles", (
+                "All particle systems of the "
+                "source object"
+            )),
+            ('PARTICLE_CHILD', "Child Particles", (
+                "All particle systems of the "
+                "child objects"
+            )),
+            ('PENCIL', "Annotation Pencil", "Annotation Grease Pencil."),
+        ),
+        options={'ENUM_FLAG'},
+        default={'PARTICLE_OWN'},
+    )
 
     source_limit: IntProperty(
-            name="Source Limit",
-            description="Limit the number of input points, 0 for unlimited",
-            min=0, max=5000,
-            default=100,
-            )
+        name="Source Limit",
+        description="Limit the number of input points, 0 for unlimited",
+        min=0, max=5000,
+        default=100,
+    )
 
     source_noise: FloatProperty(
-            name="Noise",
-            description="Randomize point distribution",
-            min=0.0, max=1.0,
-            default=0.0,
-            )
+        name="Noise",
+        description="Randomize point distribution",
+        min=0.0, max=1.0,
+        default=0.0,
+    )
 
     cell_scale: FloatVectorProperty(
-            name="Scale",
-            description="Scale Cell Shape",
-            size=3,
-            min=0.0, max=1.0,
-            default=(1.0, 1.0, 1.0),
-            )
+        name="Scale",
+        description="Scale Cell Shape",
+        size=3,
+        min=0.0, max=1.0,
+        default=(1.0, 1.0, 1.0),
+    )
 
     # -------------------------------------------------------------------------
     # Recursion
 
     recursion: IntProperty(
-            name="Recursion",
-            description="Break shards recursively",
-            min=0, max=5000,
-            default=0,
-            )
+        name="Recursion",
+        description="Break shards recursively",
+        min=0, max=5000,
+        default=0,
+    )
 
     recursion_source_limit: IntProperty(
-            name="Source Limit",
-            description="Limit the number of input points, 0 for unlimited (applies to recursion only)",
-            min=0, max=5000,
-            default=8,
-            )
+        name="Source Limit",
+        description="Limit the number of input points, 0 for unlimited (applies to recursion only)",
+        min=0, max=5000,
+        default=8,
+    )
 
     recursion_clamp: IntProperty(
-            name="Clamp Recursion",
-            description="Finish recursion when this number of objects is reached (prevents recursing for extended periods of time), zero disables",
-            min=0, max=10000,
-            default=250,
-            )
+        name="Clamp Recursion",
+        description=(
+            "Finish recursion when this number of objects is reached "
+            "(prevents recursing for extended periods of time), zero disables"
+        ),
+        min=0, max=10000,
+        default=250,
+    )
 
     recursion_chance: FloatProperty(
-            name="Random Factor",
-            description="Likelihood of recursion",
-            min=0.0, max=1.0,
-            default=0.25,
-            )
+        name="Random Factor",
+        description="Likelihood of recursion",
+        min=0.0, max=1.0,
+        default=0.25,
+    )
 
     recursion_chance_select: EnumProperty(
-            name="Recurse Over",
-            items=(('RANDOM', "Random", ""),
-                   ('SIZE_MIN', "Small", "Recursively subdivide smaller objects"),
-                   ('SIZE_MAX', "Big", "Recursively subdivide bigger objects"),
-                   ('CURSOR_MIN', "Cursor Close", "Recursively subdivide objects closer to the cursor"),
-                   ('CURSOR_MAX', "Cursor Far", "Recursively subdivide objects farther from the cursor"),
-                   ),
-            default='SIZE_MIN',
-            )
+        name="Recurse Over",
+        items=(
+            ('RANDOM', "Random", ""),
+            ('SIZE_MIN', "Small", "Recursively subdivide smaller objects"),
+            ('SIZE_MAX', "Big", "Recursively subdivide bigger objects"),
+            ('CURSOR_MIN', "Cursor Close", "Recursively subdivide objects closer to the cursor"),
+            ('CURSOR_MAX', "Cursor Far", "Recursively subdivide objects farther from the cursor"),
+        ),
+        default='SIZE_MIN',
+    )
 
     # -------------------------------------------------------------------------
     # Mesh Data Options
 
     use_smooth_faces: BoolProperty(
-            name="Smooth Interior",
-            description="Smooth Faces of inner side",
-            default=False,
-            )
+        name="Smooth Interior",
+        description="Smooth Faces of inner side",
+        default=False,
+    )
 
     use_sharp_edges: BoolProperty(
-            name="Sharp Edges",
-            description="Set sharp edges when disabled",
-            default=True,
-            )
+        name="Sharp Edges",
+        description="Set sharp edges when disabled",
+        default=True,
+    )
 
     use_sharp_edges_apply: BoolProperty(
-            name="Apply Split Edge",
-            description="Split sharp hard edges",
-            default=True,
-            )
+        name="Apply Split Edge",
+        descrip

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list