On 05/08/2016 at 09:28, xxxxxxxx wrote:
I'm trying to write a texture path key into a simple bitmap shader. Setting the value as such works fine and without problems, but writing an actual key fails. The key is being generated and also written on the curve and into the track, but it holds no value. However, calling GeGetData() (not just in that print statement in the code, but also when I manually call it via the Console after creation) on that apparently empty key _does_ show the actual value as expected. It just never makes it into the "live" system.
The key always shows up as Orange and not as Red, so apparently something is amiss - I just can't figure out what.
The track is defined as such:
desc = c4d.DescID(c4d.DescLevel(c4d.BITMAPSHADER_FILENAME, c4d.DTYPE_FILENAME, c4d.Xbitmap))
def setKeyValueFileName(self, op, desc, fileName) : if not os.path.exists(fileName) : print "Filename does not exist" return doc = op.GetDocument() track = op.FindCTrack(desc) if not track: track = c4d.CTrack(op, desc) op.InsertTrackSorted(track) curve = track.GetCurve() key = c4d.CKey() key.SetTime(curve, doc.GetTime()) key.SetGeData(curve, fileName) print key.GetGeData() curve.InsertKey(key)