SetKeyableAttributes

Introduced

v5.0

Description

Sets or clears the keyable attributes on the list of parameters created by using the marking parameter string on the input list of objects.

Scripting Syntax

SetKeyableAttributes( [InputObjs], [Params], [Attribute] );

Parameters

Parameter Type Description
InputObjs String List of objects.

Default Value: Currently selected objects

Params String Parameter list, for example: kine.local.posx,kine.local.posy,kine.local.posz

Default Value: ""

Attribute siKeyableAttributeType What action to peform?

Default Value: siKeyableAttributeKeyable

Examples

1. VBScript Example

' Create a primitive cone and add custom parameter on it, then make that custom parameter keyable

NewScene , False

CreatePrim "Cone", "MeshSurface"

SIAddCustomParameter "cone", "MyFloat", siDouble, 0, 0, 1, , 5, 0, 1

SetKeyableAttributes "cone", "CustomPSet.MyFloat", siKeyableAttributeKeyable

2. JScript Example

// Create two Null objects and make their kine.local.active parameter keyable

NewScene(null, false);

GetPrim("Null", null, null, null);

GetPrim("Null", null, null, null);

SetKeyableAttributes("null,null1", "kine.local.active", siKeyableAttributeKeyable);

3. VBScript Example

' Change the scaling and rotation parameters on all the selected objects (the two nulls) from their default keyable to non-keyable visible

NewScene , False

GetPrim "Null"

GetPrim "Null"

SelectObj "Null,Null1"

SetKeyableAttributes , "kine.local.scl,kine.local.ori.euler", siKeyableAttributeNonKeyableVisible

4. JScript Example

// Clear the keyable attribute on the scaling parameters of the Null and Null1 objects

NewScene( null, false );

GetPrim( "Null" );

GetPrim( "Null" );

SetKeyableAttributes( "null,null1", "kine.local.scl.sclx,kine.local.scl.scly,kine.local.scl.sclz", siKeyableAttributeClear );

5. Python Example

# Clear the keyable attributes on the rotation parameters of all the selected objects (the two nulls)

from win32com.client import constants as c

Application.NewScene( "", 0 )

Application.GetPrim( "Null" )

Application.GetPrim( "Null" )

Application.SelectObj( "Null,Null1" )

Application.SetKeyableAttributes( "", "kine.local.ori.euler", c.siKeyableAttributeClear )

See Also

SaveKeyOnKeyable SaveKeyOnMarkedKeyable