THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/07/2011 at 07:18, xxxxxxxx wrote:
Hi folks,
I'm trying to built a script that should (acts as a configurator) creates keyframes based on userdata with 4*4*7*7 possibilites.
This should be possible with some for - in - loops, at least a smart girl told me so.
The major thing I don't know to handle is adding a key and setting the value.
Here is a test from what I've got so far:
xtag = obj.GetFirstTag()
ctrack_dach = xtag.GetCTracks()[0]
curve_dach = ctrack_dach.GetCurve()
print "Number of keys: ", curve_dach.GetKeyCount()
print curve_dach.GetKey(1).GetGeData()
and this returns the correct value for the actual setting.
But how do I add a key and set this ? Since there is no SetSeData()
I mean I could set it like so
xtag[c4d.ID_USERDATA, 3] = 2
But I want to add a key and store the value in it.
Any help is much apprecciated