Fixed: Setting StyledText at keyframes from a program.

Dear Forum.
I'm trying to program setting the StyledText values of a text+ tool at particular KeyFrames.
I created a super simple comp with four KeyFrames and then set about using Python to interrogate the values.
In the Comp I can see that I would expect a structure to look like this:
KeyFrames = {
[0] = { 0, RH = { 13.3333333333333, 0.333333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC"
} },
[40] = { 1, LH = { 26.6666666666667, 0.666666666666667 }, RH = { 53.3333333333333, 1.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC1"
} },
[80] = { 2, LH = { 66.6666666666667, 1.66666666666667 }, RH = { 86.6666666666667, 2.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC2"
} },
[100] = { 3, LH = { 93.3333333333333, 2.66666666666667 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC3"
} }
}
However I only get this from Python:
KeyFrames of StyledText: {1.0: 0.0, 2.0: 40.0, 3.0: 80.0, 4.0: 100.0}
And this, from exporting the Spline:
DFSP
0.000000 0.000000
40.000000 1.000000
80.000000 2.000000
100.000000 3.000000
Here's my code:
kf = comp.TextTarget.StyledText.GetKeyFrames()
print "KeyFrames of StyledText: {0}".format(kf)
print "SplineColor of StyledText: {0}".format(comp.TextTarget.StyledText.SplineColor)
print "======= Attributes and Values of Styled Text ========"
for key in comp.TextTarget.StyledText.GetAttrs().keys():
print "Key: {0} Value {1}".format(key, comp.TextTarget.StyledText.GetAttrs()[key])
And, here are the results of running that code:
KeyFrames of StyledText: {1.0: 0.0, 2.0: 40.0, 3.0: 80.0, 4.0: 100.0}
SplineColor of StyledText: None
======= Attributes and Values of Styled Text ========
Key: INPB_IC_StepRestrict Value False
Key: INPN_MinAllowed Value -1000000.0
Key: INPI_Priority Value 0.0
Key: INPS_ICS_ControlPage Value Text
Key: INPN_MaxScale Value 1.0
Key: INPB_ForceNotify Value False
Key: INPB_PC_Visible Value False
Key: INPI_IC_ControlGroup Value 0.0
Key: INPI_IC_ControlID Value 0.0
Key: INPI_PC_ControlID Value 0.0
Key: INPS_ID Value StyledText
Key: INPI_IC_DisplayedPrecision Value 0.0
Key: INPN_IC_Center Value 0.0
Key: INPB_Disabled Value False
Key: INPB_Required Value True
Key: INPN_Default Value 0.0
Key: INPB_IC_TimeType Value False
Key: INPB_InteractivePassive Value False
Key: INPB_SendRequest Value True
Key: INPS_DataType Value Text
Key: INPN_UserData2 Value 0.0
Key: INPN_DefaultX Value 0.0
Key: INPI_SubType Value 0.0
Key: INPB_TextEditControl_Wrap Value False
Key: INPI_NumSlots Value 1.0
Key: INPB_InitialNotify Value False
Key: INPI_SetupPriority Value 0.0
Key: INPN_MaxAllowed Value 1000000.0
Key: INPB_Passive Value False
Key: INPB_TextEditControl_ReadOnly Value False
Key: INPID_InputControl Value TextEditControl
Key: INPI_IC_ControlPage Value 1.0
Key: INPB_Connected Value True
Key: INPB_Integer Value False
Key: INPS_Name Value Styled Text
Key: INPB_IC_Visible Value False
Key: INPI_PC_ControlGroup Value 0.0
Key: INPN_MinScale Value 0.0
Key: INPI_IC_Steps Value 0.0
Key: INPB_PC_FastSampleRate Value False
Key: INPN_ICD_Width Value 0.0
Key: INPB_DoNotifyChanged Value False
Key: INPB_Active Value True
Key: INPB_OpMenu Value False
Key: INPI_TextEditControl_Lines Value 10.0
Key: INPID_PreviewControl Value PreviewControlStyledText
Key: INPI_PC_GrabPriority Value 0.0
Key: INPN_UserData3 Value 0.0
Key: INPN_DefaultY Value 0.0
Key: INPB_External Value True
Key: INPI_UserData Value 0.0
=================================
I can't see any way of accessing the other attributes of the KeyFrames.
Now I realise that I could write some Python to directly inject these into the Comp, however this doesn't feel right?
Am I missing something? is there a neat way of doing this? Am I treating the Class wrong.
Many thanks for any guidance ...... Andy
I'm trying to program setting the StyledText values of a text+ tool at particular KeyFrames.
I created a super simple comp with four KeyFrames and then set about using Python to interrogate the values.
In the Comp I can see that I would expect a structure to look like this:
KeyFrames = {
[0] = { 0, RH = { 13.3333333333333, 0.333333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC"
} },
[40] = { 1, LH = { 26.6666666666667, 0.666666666666667 }, RH = { 53.3333333333333, 1.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC1"
} },
[80] = { 2, LH = { 66.6666666666667, 1.66666666666667 }, RH = { 86.6666666666667, 2.33333333333333 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC2"
} },
[100] = { 3, LH = { 93.3333333333333, 2.66666666666667 }, Flags = { Linear = true, LockedY = true }, Value = Text {
Value = "ABC3"
} }
}
However I only get this from Python:
KeyFrames of StyledText: {1.0: 0.0, 2.0: 40.0, 3.0: 80.0, 4.0: 100.0}
And this, from exporting the Spline:
DFSP
0.000000 0.000000
40.000000 1.000000
80.000000 2.000000
100.000000 3.000000
Here's my code:
kf = comp.TextTarget.StyledText.GetKeyFrames()
print "KeyFrames of StyledText: {0}".format(kf)
print "SplineColor of StyledText: {0}".format(comp.TextTarget.StyledText.SplineColor)
print "======= Attributes and Values of Styled Text ========"
for key in comp.TextTarget.StyledText.GetAttrs().keys():
print "Key: {0} Value {1}".format(key, comp.TextTarget.StyledText.GetAttrs()[key])
And, here are the results of running that code:
KeyFrames of StyledText: {1.0: 0.0, 2.0: 40.0, 3.0: 80.0, 4.0: 100.0}
SplineColor of StyledText: None
======= Attributes and Values of Styled Text ========
Key: INPB_IC_StepRestrict Value False
Key: INPN_MinAllowed Value -1000000.0
Key: INPI_Priority Value 0.0
Key: INPS_ICS_ControlPage Value Text
Key: INPN_MaxScale Value 1.0
Key: INPB_ForceNotify Value False
Key: INPB_PC_Visible Value False
Key: INPI_IC_ControlGroup Value 0.0
Key: INPI_IC_ControlID Value 0.0
Key: INPI_PC_ControlID Value 0.0
Key: INPS_ID Value StyledText
Key: INPI_IC_DisplayedPrecision Value 0.0
Key: INPN_IC_Center Value 0.0
Key: INPB_Disabled Value False
Key: INPB_Required Value True
Key: INPN_Default Value 0.0
Key: INPB_IC_TimeType Value False
Key: INPB_InteractivePassive Value False
Key: INPB_SendRequest Value True
Key: INPS_DataType Value Text
Key: INPN_UserData2 Value 0.0
Key: INPN_DefaultX Value 0.0
Key: INPI_SubType Value 0.0
Key: INPB_TextEditControl_Wrap Value False
Key: INPI_NumSlots Value 1.0
Key: INPB_InitialNotify Value False
Key: INPI_SetupPriority Value 0.0
Key: INPN_MaxAllowed Value 1000000.0
Key: INPB_Passive Value False
Key: INPB_TextEditControl_ReadOnly Value False
Key: INPID_InputControl Value TextEditControl
Key: INPI_IC_ControlPage Value 1.0
Key: INPB_Connected Value True
Key: INPB_Integer Value False
Key: INPS_Name Value Styled Text
Key: INPB_IC_Visible Value False
Key: INPI_PC_ControlGroup Value 0.0
Key: INPN_MinScale Value 0.0
Key: INPI_IC_Steps Value 0.0
Key: INPB_PC_FastSampleRate Value False
Key: INPN_ICD_Width Value 0.0
Key: INPB_DoNotifyChanged Value False
Key: INPB_Active Value True
Key: INPB_OpMenu Value False
Key: INPI_TextEditControl_Lines Value 10.0
Key: INPID_PreviewControl Value PreviewControlStyledText
Key: INPI_PC_GrabPriority Value 0.0
Key: INPN_UserData3 Value 0.0
Key: INPN_DefaultY Value 0.0
Key: INPB_External Value True
Key: INPI_UserData Value 0.0
=================================
I can't see any way of accessing the other attributes of the KeyFrames.
Now I realise that I could write some Python to directly inject these into the Comp, however this doesn't feel right?
Am I missing something? is there a neat way of doing this? Am I treating the Class wrong.
Many thanks for any guidance ...... Andy