Code:
def Skel_poser.run_frames(time,lframe)
keyframes = {}
model = Sketchup.active_model
d = model.attribute_dictionaries['kframes']
d.each_pair do | key,value |
a = 1
value.each do| v |
if v.nil?
v = [[1,0,0],0]
end
v << time * a
a += 1
end
keyframes[key] = value
end
return keyframes
end
This code runs fine if there are no empty elements in the value array. If there are
puts v shows the change from nil to the new array but
value shows the original nil.
What have I done wrongly ... please!