FCurveKey.Locked
 
 
 

FCurveKey.Locked

Description

Returns the locked state of the FCurve key as a Boolean.

C# Syntax

// get accessor
Boolean rtn = FCurveKey.Locked;
// set accessor
FCurveKey.Locked = Boolean;

Examples

1. JScript Example

/*
        This example displays the properties of an fcurve's keys
*/
NewScene( null, false );
var oCube = Application.ActiveSceneRoot.AddGeometry( "Cube","MeshSurface" );
var aValues = new Array( 0,5, 1,6, 2,7, 3,8, 4,9, 5,10 );
var oFCurve = oCube.PosX.AddFCurve2( aValues );
// Write the fcurve keys
for ( var k=0; k<oFCurve.Keys.Count; k++ ) {
        var fckey = oFCurve.Keys(k);
        Application.LogMessage( fckey.Name + " Value: " + fckey.Value );
        Application.LogMessage( fckey.Name + " Locked: " + fckey.Locked );
        Application.LogMessage( fckey.Name + " Left: " + fckey.Left );
        Application.LogMessage( fckey.Name + " Right: " + fckey.Right );
        Application.LogMessage( fckey.Name + " LeftTanX: " + fckey.LeftTanX );
        Application.LogMessage( fckey.Name + " LeftTanY: " + fckey.LeftTanY );
        Application.LogMessage( fckey.Name + " RightTanX: " + fckey.RightTanX );
        Application.LogMessage( fckey.Name + " RightTanY: " + fckey.RightTanY );
        Application.LogMessage( fckey.Name + " Interpolation: " + fckey.Interpolation );
        Application.LogMessage( fckey.Name + " Constraint(siParameterConstraint): " + fckey.Constraint(siParameterConstraint) );
        Application.LogMessage( fckey.Name + " Time: " + fckey.Time );
}
// Expected results:
//INFO :  Value: 5
//INFO :  Locked: false
//INFO :  Left: 5
//INFO :  Right: 5
//INFO :  LeftTanX: -0.3333333333333333
//INFO :  LeftTanY: 0
//INFO :  RightTanX: 0.3333333333333333
//INFO :  RightTanY: 0
//INFO :  Interpolation: 3
//INFO :  Constraint(siParameterConstraint): false
//INFO :  Time: 0
//INFO :  Value: 6
//
//INFO :  Locked: false
//INFO :  Left: 6
//INFO :  Right: 6
//INFO :  LeftTanX: -0.33333333333333326
//INFO :  LeftTanY: -0.33333333333333303
//INFO :  RightTanX: 0.33333333333333326
//INFO :  RightTanY: 0.33333333333333303
//INFO :  Interpolation: 3
//INFO :  Constraint(siParameterConstraint): false
//INFO :  Time: 1
// etc.

2. VBScript Example

'
' This example displays the properties of an fcurve's keys
'
NewScene , false
set oCube = Application.ActiveSceneRoot.AddGeometry("Cube","MeshSurface")
dim aValues
aValues = array(0.00, 5.00, 1.00, 6.00, 2.00, 7.00, 3.00, 8.00, 4.00, 9.00, 5.00, 10.00)
set oFCurve = oCube.PosX.AddFCurve2( aValues)
' Write the fcurve keys
for each k in oFCurve.Keys
        Application.LogMessage k.Name &" Value: " & k.Value
        Application.LogMessage k.Name &" Locked: " & k.Locked
        Application.LogMessage k.Name &" Left: " & k.Left
        Application.LogMessage k.Name &" Right: " & k.Right
        Application.LogMessage k.Name &" LeftTanX: " & k.LeftTanX
        Application.LogMessage k.Name &" LeftTanY: " & k.LeftTanY
        Application.LogMessage k.Name &" RightTanX: " & k.RightTanX
        Application.LogMessage k.Name &" RightTanY: " & k.RightTanY
        Application.LogMessage k.Name &" Interpolation: " & k.Interpolation
        Application.LogMessage k.Name &" Constraint(siParameterConstraint): " & k.Constraint(siParameterConstraint)
        Application.LogMessage k.Name &" Time: " & k.Time
next
' Expected results:
'INFO :  Value: 5
'INFO :  Locked: False
'INFO :  Left: 5
'INFO :  Right: 5
'INFO :  LeftTanX: -0.333333333333333
'INFO :  LeftTanY: 0
'INFO :  RightTanX: 0.333333333333333
'INFO :  RightTanY: 0
'INFO :  Interpolation: 3
'INFO :  Constraint(siParameterConstraint): False
'INFO :  Time: 0
'
'INFO :  Value: 6
'INFO :  Locked: False
'INFO :  Left: 6
'INFO :  Right: 6
'INFO :  LeftTanX: -0.333333333333333
'INFO :  LeftTanY: -0.333333333333333
'INFO :  RightTanX: 0.333333333333333
'INFO :  RightTanY: 0.333333333333333
'INFO :  Interpolation: 3
'INFO :  Constraint(siParameterConstraint): False
'INFO :  Time: 1
' etc.

3. Python Example

#
# This example displays the properties of an fcurve's keys
#
from win32com.client import constants as c
Application.NewScene( "", 0 )
oCube = Application.ActiveSceneRoot.AddGeometry( "Cube","MeshSurface" )
aValues = [ 0,5, 1,6, 2,7, 3,8, 4,9, 5,10 ]
oFCurve = oCube.PosX.AddFCurve2( aValues )
# Write the fcurve keys
for fckey in oFCurve.Keys :
        Application.LogMessage( fckey.Name + " Value: " + str(fckey.Value) )
        Application.LogMessage( fckey.Name + " Locked: " + str(fckey.Locked) )
        Application.LogMessage( fckey.Name + " Left: " + str(fckey.Left) )
        Application.LogMessage( fckey.Name + " Right: " + str(fckey.Right) )
        Application.LogMessage( fckey.Name + " LeftTanX: " + str(fckey.LeftTanX) )
        Application.LogMessage( fckey.Name + " LeftTanY: " + str(fckey.LeftTanY) )
        Application.LogMessage( fckey.Name + " RightTanX: " + str(fckey.RightTanX) )
        Application.LogMessage( fckey.Name + " RightTanY: " + str(fckey.RightTanY) )
        Application.LogMessage( fckey.Name + " Interpolation: " + str(fckey.Interpolation) )
        Application.LogMessage( fckey.Name + " Constraint(siParameterConstraint): " + str(fckey.Constraint(c.siParameterConstraint)) )
        Application.LogMessage( fckey.Name + " Time: " + str(fckey.Time) )
# Expected results:
#INFO :  Value: 5.0
#INFO :  Locked: False
#INFO :  Left: 5.0
#INFO :  Right: 5.0
#INFO :  LeftTanX: -0.333333333333
#INFO :  LeftTanY: 0.0
#INFO :  RightTanX: 0.333333333333
#INFO :  RightTanY: 0.0
#INFO :  Interpolation: 3
#INFO :  Constraint(siParameterConstraint): False
#INFO :  Time: 0.0
#
#INFO :  Value: 6.0
#INFO :  Locked: False
#INFO :  Left: 6.0
#INFO :  Right: 6.0
#INFO :  LeftTanX: -0.333333333333
#INFO :  LeftTanY: -0.333333333333
#INFO :  RightTanX: 0.333333333333
#INFO :  RightTanY: 0.333333333333
#INFO :  Interpolation: 3
#INFO :  Constraint(siParameterConstraint): False
#INFO :  Time: 1.0
# etc.