[Closed] "No map function for 100"
Ok, I want to konvert a IK animation into a FK animation. for this purpose, i clone all Bones, and Align them every frame to their orginals. It works well, but only with the first one selectet objekt. It creates one motre bone, and then it crahses with the error: “no map function for 100” can anybody gues, what that means???
edit oh, i see, it doesn´t work as well… it only create a second bone, and doesn´t do enything else… shit
heres the script:
macroScript IK_kill category:"TGM´s Tools"
(
Global temp
Global Copy_obj=#()
GLobal Start=0 --start time of creating an IK fake
Global Range=100 --range of creating an IK fake
function align_all_frames copy target= --fakes the Ik for one Bone during the given time
(
animate on
for i in Range do
(
temp=i+Start --convert start+range into the aktual time
at time temp
copy.AlignObject target -- aligning the given two objekts together
)
)
rollout Kill_IK_rollout "Kill IK by TGM" width:162 height:32
(
button delIK "Kill IK Script" pos:[45,7] width:72 height:21
on delIK pressed do
(
Orginal_obj= selection as array -- convert the selction into an array of objekts
for i in Orginal_obj do --iterate through the array
(
t=copy i --and copy every objekt in the array
align_all_frames t i --and now attach it to its parent
)
)
)
createdialog Kill_IK_rollout
)
I wouldn’t do it like that. I would duplicate the bones and constrain them to the IK bones. Very simple but it should work well.
Stev
the problem is, the exporter doesn´t see constrains…
i use panda exporter to *.X format…
GLobal Start=0 --start time of creating an IK fake
Global Range=100 --range of creating an IK fake
function align_all_frames copy target= --fakes the Ik for one Bone during the given time
(
animate on
for i = Start to (Range+Start) do
(
temp=i+Start --convert start+range into the aktual time
at time temp
copy.transform = target.transform -- aligning the given two objekts together
)
)
rollout Kill_IK_rollout "Kill IK by TGM" width:162 height:32
(
local Orginal_obj = #();
button delIK "Kill IK Script" pos:[45,7] width:72 height:21
on delIK pressed do
(
Orginal_obj = selection as array -- convert the selction into an array of objekts
for i in Orginal_obj do --iterate through the array
(
t=copy i --and copy every objekt in the array
align_all_frames t i --and now attach it to its parent
)
)
)
createdialog Kill_IK_rollout
This seems to work. I changed the loop and instead of align, I had it set the transform.
Stev