I’m trying to edit an existing “LocY” IpoCurve in Blender 2.36 within a python script. The curve already has points (keyframes) set on frame 0 and let’s say frame 10. Example:
IpoCurve Point 0: [0, 1000]
IpoCurve Point 1: [10, 900]
Now I’m trying to insert a new key on frame 5 with a value of let’s say ‘100’:
I had the same thing, all messed up wires.
.redraw() nor .update() fixes this.
Going into the curves with TAB-TAB does fix it, but thats the worst possible solution, except saving and loading the file, what is new to me.
I read there is going to be a new function, insertIpoKey() or something, maybe that might do the trick? But that’s only for LOC ROT (and SIZ?)
I can’t do anything but agree with you on that. But unfortunately I don’t know any other solution at the moment either. So, unless some people who have a better knowledge of python than me (and there are a lot of them), think of an alternative way, we’ll have to wait for that new function you mentioned.
Well, I’ve hoped that 2.37 would bring a workaround for the IPO editing problem but I can’t find it :x
There’s the new “Delete” method to remove a control point from the curve but the “insert” is IMHO still appending points
Well, I could now delete all control points and then append (insert) them all together again with my new control point at the right index but this really seems silly to me and I’ve not tried that yet… 8)
Any ideas? Something else in 2.37 that I’m missing?