[Bf-extensions-cvs] [b3330d29] master: curve_assign_shapekey: Separate list for Vertex Alignment Criteria with only min and max of each axis. Other values from matchList (like Vertex Count) are not relevant for Vertex Alignment Criteria.

Shrinivas Kulkarni noreply at git.blender.org
Sat Oct 26 13:11:42 CEST 2019


Commit: b3330d2976e08c1f18dcf5fd91561478c9c1afd6
Author: Shrinivas Kulkarni
Date:   Sat Oct 26 16:40:40 2019 +0530
Branches: master
https://developer.blender.org/rBAb3330d2976e08c1f18dcf5fd91561478c9c1afd6

curve_assign_shapekey: Separate list for Vertex Alignment Criteria with only min and max of each axis. Other values from matchList (like Vertex Count) are not relevant for Vertex Alignment Criteria.

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

M	curve_assign_shapekey.py

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

diff --git a/curve_assign_shapekey.py b/curve_assign_shapekey.py
index f519acc5..4a6ed0ca 100644
--- a/curve_assign_shapekey.py
+++ b/curve_assign_shapekey.py
@@ -32,17 +32,24 @@ bl_info = {
     "blender": (2, 80, 0),
 }
 
+alignList = [('minX', 'Min X', 'Align vertices with Min X'),
+            ('maxX', 'Max X', 'Align vertices with Max X'),
+            ('minY', 'Min Y', 'Align vertices with Min Y'),
+            ('maxY', 'Max Y', 'Align vertices with Max Y'),
+            ('minZ', 'Min Z', 'Align vertices with Min Z'),
+            ('maxZ', 'Max Z', 'Align vertices with Max Z')]
+
 matchList = [('vCnt', 'Vertex Count', 'Match by vertex count'),
             ('bbArea', 'Area', 'Match by surface area of the bounding box'), \
             ('bbHeight', 'Height', 'Match by bounding box height'), \
             ('bbWidth', 'Width', 'Match by bounding box width'),
             ('bbDepth', 'Depth', 'Match by bounding box depth'),
-            ('minX', 'Min X', 'Match by  bounding bon Min X'),
-            ('maxX', 'Max X', 'Match by  bounding bon Max X'),
-            ('minY', 'Min Y', 'Match by  bounding bon Min Y'),
-            ('maxY', 'Max Y', 'Match by  bounding bon Max Y'),
-            ('minZ', 'Min Z', 'Match by  bounding bon Min Z'),
-            ('maxZ', 'Max Z', 'Match by  bounding bon Max Z')]
+            ('minX', 'Min X', 'Match by bounding bon Min X'),
+            ('maxX', 'Max X', 'Match by bounding bon Max X'),
+            ('minY', 'Min Y', 'Match by bounding bon Min Y'),
+            ('maxY', 'Max Y', 'Match by bounding bon Max Y'),
+            ('minZ', 'Min Z', 'Match by bounding bon Min Z'),
+            ('maxZ', 'Max Z', 'Match by bounding bon Max Z')]
 
 DEF_ERR_MARGIN = 0.0001
 
@@ -779,7 +786,7 @@ class AssignShapeKeysOp(Operator):
         matchCri2 = params.matchCri2
         matchCri3 = params.matchCri3
 
-        alignBy = params.alignList
+        alignBy = params.alignCos
         alignVal1 = params.alignVal1
         alignVal2 = params.alignVal2
         alignVal3 = params.alignVal3
@@ -1000,20 +1007,20 @@ class AssignShapeKeyParams(bpy.types.PropertyGroup):
                  ('localspace', 'Local Space', 'localspace')], \
         description = 'Space that shape keys are evluated in')
 
-    alignList : EnumProperty(name="Vertex Alignment", items = \
+    alignCos : EnumProperty(name="Vertex Alignment", items = \
         [("-None-", 'Manual Alignment', "Align curve segments based on starting vertex"), \
          ('vertCo', 'Vertex Coordinates', 'Align curve segments based on vertex coordinates')], \
         description = 'Start aligning the vertices of target and shape keys from',
         default = '-None-')
 
     alignVal1 : EnumProperty(name="Value 1",
-        items = matchList, default = 'minX', description='First align criterion')
+        items = alignList, default = 'minX', description='First align criterion')
 
     alignVal2 : EnumProperty(name="Value 2",
-        items = matchList, default = 'maxY', description='Second align criterion')
+        items = alignList, default = 'maxY', description='Second align criterion')
 
     alignVal3 : EnumProperty(name="Value 3",
-        items = matchList, default = 'minZ', description='Third align criterion')
+        items = alignList, default = 'minZ', description='Third align criterion')
 
     matchParts : EnumProperty(name="Match Parts", items = \
         [("-None-", 'None', "Don't match parts"), \
@@ -1063,9 +1070,9 @@ class AssignShapeKeysPanel(Panel):
             row.prop(params, "space")
 
             row = col.row()
-            row.prop(params, "alignList")
+            row.prop(params, "alignCos")
 
-            if(params.alignList == 'vertCo'):
+            if(params.alignCos == 'vertCo'):
                 row = col.row()
                 row.prop(params, "alignVal1")
                 row.prop(params, "alignVal2")



More information about the Bf-extensions-cvs mailing list