Skip to content
Snippets Groups Projects
Commit b3330d29 authored by Shrinivas Kulkarni's avatar Shrinivas Kulkarni
Browse files

curve_assign_shapekey: Separate list for Vertex Alignment Criteria with only...

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.
parent 817d9c62
Branches
Tags
No related merge requests found
...@@ -32,17 +32,24 @@ bl_info = { ...@@ -32,17 +32,24 @@ bl_info = {
"blender": (2, 80, 0), "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'), matchList = [('vCnt', 'Vertex Count', 'Match by vertex count'),
('bbArea', 'Area', 'Match by surface area of the bounding box'), \ ('bbArea', 'Area', 'Match by surface area of the bounding box'), \
('bbHeight', 'Height', 'Match by bounding box height'), \ ('bbHeight', 'Height', 'Match by bounding box height'), \
('bbWidth', 'Width', 'Match by bounding box width'), ('bbWidth', 'Width', 'Match by bounding box width'),
('bbDepth', 'Depth', 'Match by bounding box depth'), ('bbDepth', 'Depth', 'Match by bounding box depth'),
('minX', 'Min X', 'Match by bounding bon Min X'), ('minX', 'Min X', 'Match by bounding bon Min X'),
('maxX', 'Max X', 'Match by bounding bon Max X'), ('maxX', 'Max X', 'Match by bounding bon Max X'),
('minY', 'Min Y', 'Match by bounding bon Min Y'), ('minY', 'Min Y', 'Match by bounding bon Min Y'),
('maxY', 'Max Y', 'Match by bounding bon Max Y'), ('maxY', 'Max Y', 'Match by bounding bon Max Y'),
('minZ', 'Min Z', 'Match by bounding bon Min Z'), ('minZ', 'Min Z', 'Match by bounding bon Min Z'),
('maxZ', 'Max Z', 'Match by bounding bon Max Z')] ('maxZ', 'Max Z', 'Match by bounding bon Max Z')]
DEF_ERR_MARGIN = 0.0001 DEF_ERR_MARGIN = 0.0001
...@@ -779,7 +786,7 @@ class AssignShapeKeysOp(Operator): ...@@ -779,7 +786,7 @@ class AssignShapeKeysOp(Operator):
matchCri2 = params.matchCri2 matchCri2 = params.matchCri2
matchCri3 = params.matchCri3 matchCri3 = params.matchCri3
alignBy = params.alignList alignBy = params.alignCos
alignVal1 = params.alignVal1 alignVal1 = params.alignVal1
alignVal2 = params.alignVal2 alignVal2 = params.alignVal2
alignVal3 = params.alignVal3 alignVal3 = params.alignVal3
...@@ -1000,20 +1007,20 @@ class AssignShapeKeyParams(bpy.types.PropertyGroup): ...@@ -1000,20 +1007,20 @@ class AssignShapeKeyParams(bpy.types.PropertyGroup):
('localspace', 'Local Space', 'localspace')], \ ('localspace', 'Local Space', 'localspace')], \
description = 'Space that shape keys are evluated in') 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"), \ [("-None-", 'Manual Alignment', "Align curve segments based on starting vertex"), \
('vertCo', 'Vertex Coordinates', 'Align curve segments based on vertex coordinates')], \ ('vertCo', 'Vertex Coordinates', 'Align curve segments based on vertex coordinates')], \
description = 'Start aligning the vertices of target and shape keys from', description = 'Start aligning the vertices of target and shape keys from',
default = '-None-') default = '-None-')
alignVal1 : EnumProperty(name="Value 1", 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", 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", 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 = \ matchParts : EnumProperty(name="Match Parts", items = \
[("-None-", 'None', "Don't match parts"), \ [("-None-", 'None', "Don't match parts"), \
...@@ -1063,9 +1070,9 @@ class AssignShapeKeysPanel(Panel): ...@@ -1063,9 +1070,9 @@ class AssignShapeKeysPanel(Panel):
row.prop(params, "space") row.prop(params, "space")
row = col.row() row = col.row()
row.prop(params, "alignList") row.prop(params, "alignCos")
if(params.alignList == 'vertCo'): if(params.alignCos == 'vertCo'):
row = col.row() row = col.row()
row.prop(params, "alignVal1") row.prop(params, "alignVal1")
row.prop(params, "alignVal2") row.prop(params, "alignVal2")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment