Start a new topic

LightPoint API problems

Original Post by: sttns Fri Aug 21 02:35:38 2009

anim, animIndex = mgNewLightPointAnimation(db, "ANIM_")

#print "set current anim: ", MG_TRUE == mgSetCurrentLightPointAnimation(db, animIndex)

mgSetAttList(anim, fltLpFlashing, MG_TRUE, fltLpAnimationType, 0)

num, sequences = mgLightPointAnimationSequenceGet(anim)

mgLightPointAnimationSequenceGet() crashes my python IDLE as well as Creator 3.5.

mgLightPointAnimationSequenceSet() 's second argument accepts a mglightpointanimationsequencedata[] but how should I be specifying that in python? The documentation contains an example for the use of mgLightPointAnimationSequenceGet() but not mgLightPointAnimationSequenceSet().

Anyone have any idea what's going on?

Original Post by: SteveThompson Fri Aug 21 16:48:51 2009

It seems there are some problems in the Light Point Functions regarding the sequence data.

We'll have to investigate this a bit.

But as for how to create and assign sequence data here is how you do that:

anim, animIndex = mgNewLightPointAnimation(db, "ANIM_")

sequenceData = mglightpointanimationsequencedata(4)

sequenceData[0].state = 1

sequenceData[0].duration = 0.2

sequenceData[0].colorIndex = 4

sequenceData[0].colorIntensity = 0.5

sequenceData[1].state = 0

sequenceData[1].duration = 0.5

sequenceData[1].colorIndex = 4

sequenceData[1].colorIntensity = 0.5

sequenceData[2].state = 1

sequenceData[2].duration = 0.2

sequenceData[2].colorIndex = 4

sequenceData[2].colorIntensity = 0.5

sequenceData[3].state = 0

sequenceData[3].duration = 1.0

sequenceData[3].colorIndex = 4

sequenceData[3].colorIntensity = 0.5


fltLpFlashing, MG_TRUE,

fltLpAnimationType, 0)

mgLightPointAnimationSequenceSet (anim, sequenceData, 4)

Original Post by: SteveThompson Fri Aug 21 17:08:22 2009

It does seem that there is some memory corruption problems in the OpenFlight Script implementation for light point animation sequence data. You may find this with both Get and Set. Again, we'll continue to look into this but be warned. You might consider switching over the C API if you continue to see Creator / Idle crashing.

Login to post a comment