I’m wondering if there is possibility of making calculaded path for bone real?
It would be great if I could animate object just by moving whole armature while saving keyframes, then calulate path and make this path real. Then I could add walkcycle and other action, everything fine controlled by time IPO.
I mean “Calculated Path” from W menu. I want to make this path real and then assign object to this path. In this case I could use walkcycles with strand bone.
OK, I’ve wrote simple script to create nurbs curve based on selected object IPO LocX, LocY, LocZ information.
#!BPY
""" Registration info for Blender menus: <- these words are ignored
Name: 'IPO to Curve'
Blender: 240
Group: 'Animation'
Tip: 'Create curve from objects IPO'
"""
__author__ = 'grzybu'
__version__ = '2.42'
__url__ = ["http://grzybu.com"]
__email__=["3d@grzybu.com"]
import Blender
from Blender import Curve, Object, Scene
start_time=Blender.Draw.PupIntInput('Start frame',1, 1, 10000)
end_time=Blender.Draw.PupIntInput('End frame',100, 1, 10000)
time_step=Blender.Draw.PupIntInput('Step',5, 1, 100)
scene=Blender.Scene.GetCurrent()
import Blender,math
from math import *
obj = Blender.Object.GetSelected()
ipo_LocX=obj[0].getIpo().getCurve('LocX')
ipo_LocY=obj[0].getIpo().getCurve('LocY')
ipo_LocZ=obj[0].getIpo().getCurve('LocZ')
ipo_RotX=obj[0].getIpo().getCurve('RotX')
ipo_RotY=obj[0].getIpo().getCurve('RotY')
ipo_RotZ=obj[0].getIpo().getCurve('RotZ')
c = Curve.New() # create new curve data
cur = Scene.getCurrent() # get current scene
ob = Object.New('Curve',str(obj[0].name)+"_Curve") # make curve object
ob.link(c) # link curve data with this object
cur.link(ob) # link object into scene
i=start_time+time_step
LocX = ipo_LocX.evaluate(i-time_step)
LocY = ipo_LocY.evaluate(i-time_step)
LocZ = ipo_LocZ.evaluate(i-time_step)
c.appendNurb([LocX, LocY, LocZ, 100]);
while i<end_time:
LocX = ipo_LocX.evaluate(i)
LocY = ipo_LocY.evaluate(i)
LocZ = ipo_LocZ.evaluate(i)
c[0].append([LocX, LocY, LocZ, 100])
c.update()
i=i+time_step