diff --git a/CHANGELOG.md b/CHANGELOG.md index 912ca87..26cecb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +1.5.1 + +- fixed: also key rotation when creating curve + 1.5.0 - changed: no need to have a cycle on fcurve to bake keys anymore diff --git a/OP_animate_path.py b/OP_animate_path.py index b3c563a..8647ff2 100644 --- a/OP_animate_path.py +++ b/OP_animate_path.py @@ -35,13 +35,15 @@ def has_extremes(b, act=None): return False for fcu in act.fcurves: + if not '"' in fcu.data_path: + continue if fcu.data_path.split('"')[1] == b.name: # name of the bone if [k for k in fcu.keyframe_points if k.type == 'EXTREME']: return True return False def get_extreme_range(ob, act, b): - b_fcurves = [fcu for fcu in act.fcurves if fcu.data_path.split('"')[1] == b.bone.name] + b_fcurves = [fcu for fcu in act.fcurves if '"' in fcu.data_path and fcu.data_path.split('"')[1] == b.bone.name] # for f in b_fcurves: # print('fc:', f.data_path, f.array_index) curves = [] @@ -208,7 +210,7 @@ def anim_path_from_translate(): # axis : fcu.array_index (to get axis letter : {0:'X', 1:'Y', 2:'Z'}[fcu.array_index]) ## get only fcurves relative to selected bone - b_fcurves = [fcu for fcu in act.fcurves if fcu.data_path.split('"')[1] == b.bone.name] + b_fcurves = [fcu for fcu in act.fcurves if '"' in fcu.data_path and fcu.data_path.split('"')[1] == b.bone.name] print('b_fcurves: ', len(b_fcurves)) # find best fcurve diff --git a/OP_setup_curve_a_to_b.py b/OP_setup_curve_a_to_b.py index 526d13f..f627375 100644 --- a/OP_setup_curve_a_to_b.py +++ b/OP_setup_curve_a_to_b.py @@ -73,6 +73,8 @@ class AW_OT_create_a_b_step(bpy.types.Operator): # reset location to remove offset root.location = (0,0,0) root.keyframe_insert('location', frame=a_frame) + root.rotation_euler = (0,0,0) + root.keyframe_insert('rotation_euler', frame=a_frame) # refresh evaluation so constraint shows up correctly bpy.context.scene.frame_set(bpy.context.scene.frame_current) diff --git a/OP_setup_curve_path.py b/OP_setup_curve_path.py index 0e02812..f7b6cfa 100644 --- a/OP_setup_curve_path.py +++ b/OP_setup_curve_path.py @@ -42,8 +42,8 @@ class AW_OT_create_curve_path(bpy.types.Operator): # reset location to remove offset root.location = (0,0,0) root.keyframe_insert('location') - #root.rotation_euler = (0,0,0) - # root.keyframe_insert('rotation_euler') + root.rotation_euler = (0,0,0) + root.keyframe_insert('rotation_euler') # refresh evaluation so constraint shows up correctly bpy.context.scene.frame_set(bpy.context.scene.frame_current) diff --git a/__init__.py b/__init__.py index aded596..2e6511d 100644 --- a/__init__.py +++ b/__init__.py @@ -4,7 +4,7 @@ bl_info = { "name": "Auto Walk", "description": "Develop a walk/run cycles along a curve and pin feets", "author": "Samuel Bernou", - "version": (1, 5, 0), + "version": (1, 5, 1), "blender": (3, 0, 0), "location": "View3D", "warning": "",