Skip to content

Commit 04c3a70

Browse files
authored
feat: Update to version 1.1.2
- Fix some problems
1 parent 70154a6 commit 04c3a70

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

blender-shapekey-tools.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Author: namakoshiro
66
Created: 2025/1/11
7-
Version: 1.1.1
7+
Version: 1.1.2
88
Last Updated: 2025/1/14
99
Blender Version: 2.80 → 4.32
1010
@@ -19,7 +19,7 @@
1919
bl_info = {
2020
"name": "blender-shapekey-tools",
2121
"author": "namakoshiro",
22-
"version": (1, 1, 1),
22+
"version": (1, 1, 2),
2323
"blender": (2, 80, 0),
2424
"location": "View3D > Sidebar > Shapekey",
2525
"description": "A small tool for one click to split or merge L/R shapekeys, and generate new shapekey below the selected item",
@@ -235,12 +235,12 @@ def execute(self, context):
235235
# Store original index
236236
original_index = obj.active_shape_key_index
237237

238-
# Create left side first (will end up above right side)
239-
self.create_side_shapekey(context, active_key, 'L')
238+
# Create right side first (will end up below left side)
239+
self.create_side_shapekey(context, active_key, 'R')
240240
context.window_manager.progress_update(40)
241241

242-
# Then create right side
243-
self.create_side_shapekey(context, active_key, 'R')
242+
# Then create left side
243+
self.create_side_shapekey(context, active_key, 'L')
244244
context.window_manager.progress_update(80)
245245

246246
# Set the original shapekey value to 0
@@ -530,8 +530,9 @@ def create_weighted_side_shapekey(self, context, source_key, side, deformed_indi
530530
# Get relative position in X range using deformed position
531531
rel_pos = (source_key.data[i].co.x - x_min) / x_range
532532

533-
# For right side, invert the position
534-
if side == 'R':
533+
# For right side (.R), use weight directly (weight=1 at negative X)
534+
# For left side (.L), invert the position (weight=1 at positive X)
535+
if side == 'L':
535536
rel_pos = 1 - rel_pos
536537

537538
# Calculate weight using custom curve
@@ -684,7 +685,7 @@ def draw(self, context):
684685
box = layout.box()
685686
col = box.column()
686687
col.scale_y = 0.8
687-
col.label(text="Version: 1.1.1")
688+
col.label(text="Version: 1.1.2")
688689
col.label(text="Last Updated: 2025/1/14")
689690
col.label(text="Blender: 2.80 → 4.32")
690691

0 commit comments

Comments
 (0)