reset location at curve creation
1.4.3 - fixed: reset constrained bone position and add a location key at (0,0,0)master
parent
dbdba01485
commit
07118dafc8
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
1.4.3
|
||||
|
||||
- fixed: reset constrained bone position and add a location key at (0,0,0)
|
||||
|
||||
1.4.2
|
||||
|
||||
- added: `Ctrl + click` on Add cycle modifier remove all cycle on all fcurves (hided option to force clean)
|
||||
|
|
|
@ -61,8 +61,8 @@ class AW_OT_create_a_b_step(bpy.types.Operator):
|
|||
a = markers[0].location
|
||||
b = markers[1].location - a # remove a postion to get position in curve object space
|
||||
|
||||
a_frame = int(markers[0].name.split('_')[-1])
|
||||
b_frame = int(markers[1].name.split('_')[-1])
|
||||
a_frame = int(markers[0].name.split('_')[-1].split('.')[0])
|
||||
b_frame = int(markers[1].name.split('_')[-1].split('.')[0])
|
||||
|
||||
# Set the curve and constraint
|
||||
curve = fn.generate_curve(location=a, direction=b, name='curve_path', context=context)
|
||||
|
@ -70,6 +70,10 @@ class AW_OT_create_a_b_step(bpy.types.Operator):
|
|||
settings.path_to_follow = curve
|
||||
fn.create_follow_path_constraint(ob, curve)
|
||||
|
||||
# reset location to remove offset
|
||||
root.location = (0,0,0)
|
||||
root.keyframe_insert('location', frame=a_frame)
|
||||
|
||||
# refresh evaluation so constraint shows up correctly
|
||||
bpy.context.scene.frame_set(bpy.context.scene.frame_current)
|
||||
|
||||
|
@ -77,8 +81,6 @@ class AW_OT_create_a_b_step(bpy.types.Operator):
|
|||
|
||||
## remove all markers or keep for later reuse ?
|
||||
remove_spacetime_keys(context=None)
|
||||
|
||||
# if speed calculation is done later need to know start and end frame...
|
||||
|
||||
# Set frame start and end
|
||||
settings.start_frame = a_frame
|
||||
|
|
|
@ -38,7 +38,13 @@ class AW_OT_create_curve_path(bpy.types.Operator):
|
|||
settings.path_to_follow = curve
|
||||
|
||||
fn.create_follow_path_constraint(ob, curve)
|
||||
|
||||
|
||||
# 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')
|
||||
|
||||
# refresh evaluation so constraint shows up correctly
|
||||
bpy.context.scene.frame_set(bpy.context.scene.frame_current)
|
||||
return {"FINISHED"}
|
||||
|
|
|
@ -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, 4, 2),
|
||||
"version": (1, 4, 3),
|
||||
"blender": (3, 0, 0),
|
||||
"location": "View3D",
|
||||
"warning": "",
|
||||
|
|
Loading…
Reference in New Issue